xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello, Ahmad Rashed!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Hello, Ahmad Rashed!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [21 x i8] c"Hello, Ahmad Rashed!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ writel(int /*<<< orphan*/, void *);
void write_pxpat0(unsigned port, uint32_t value) {
  writel(value, (void *)0xb0010000 + (port * 0x100) + (0x40));
}


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

x86 assembly (clang, -O2):
<write_pxpat0>:
mov    %esi,%eax
shl    $0x8,%edi
mov    $0xb0010040,%esi
add    %rdi,%rsi
mov    %eax,%edi
jmp    1030 <writel@plt>

LLVM IR (-O0):
define void @write_pxpat0(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = mul i32 %6, 256
%8 = zext i32 %7 to i64
%9 = getelementptr i8, i8* inttoptr (i64 2952855552 to i8*), i64 %8
%10 = getelementptr i8, i8* %9, i64 64
%11 = call i32 @writel(i32 %5, i8* %10)
ret void
}

LLVM IR (-O2):
define void @write_pxpat0(i32 %0, i32 %1) {
%3 = shl i32 %0, 8
%4 = zext i32 %3 to i64
%5 = getelementptr i8, i8* inttoptr (i64 2952855552 to i8*), i64 %4
%6 = getelementptr i8, i8* %5, i64 64
%7 = tail call i32 @writel(i32 %1, i8* %6)
ret void
}
void f181(void) {
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
a:
  goto a;
  0;
}


x86 assembly (clang, -O0):
<f181>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
jmp    112e <f181+0x2e>

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

LLVM IR (-O0):
define void @f181() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = load i32, i32* %1
store i32 0, i32* %2
%8 = load i32, i32* %2
store i32 0, i32* %3
%9 = load i32, i32* %3
store i32 0, i32* %4
%10 = load i32, i32* %4
store i32 0, i32* %5
%11 = load i32, i32* %5
store i32 0, i32* %6
%12 = load i32, i32* %6
br label %13
13: ; preds = %13, %0
br label %13
}

LLVM IR (-O2):
define void @f181() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ li_stw();
int /*<<< orphan*/ stack_check_probe_1();
int /*<<< orphan*/ stack_check_probe_2();
int /*<<< orphan*/ stack_check_probe_loop_1();
int /*<<< orphan*/ stack_check_probe_loop_2();
int main(void) {
  li_stw();
  stack_check_probe_1();
  stack_check_probe_2();
  stack_check_probe_loop_1();
  stack_check_probe_loop_2();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <li_stw@plt>
mov    $0x0,%al
call   1040 <stack_check_probe_1@plt>
mov    $0x0,%al
call   1070 <stack_check_probe_2@plt>
mov    $0x0,%al
call   1030 <stack_check_probe_loop_1@plt>
mov    $0x0,%al
call   1060 <stack_check_probe_loop_2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <li_stw@plt>
xor    %eax,%eax
call   1040 <stack_check_probe_1@plt>
xor    %eax,%eax
call   1070 <stack_check_probe_2@plt>
xor    %eax,%eax
call   1030 <stack_check_probe_loop_1@plt>
xor    %eax,%eax
call   1060 <stack_check_probe_loop_2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @li_stw()
%3 = call i32 (...) @stack_check_probe_1()
%4 = call i32 (...) @stack_check_probe_2()
%5 = call i32 (...) @stack_check_probe_loop_1()
%6 = call i32 (...) @stack_check_probe_loop_2()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @li_stw()
%2 = tail call i32 (...) @stack_check_probe_1()
%3 = tail call i32 (...) @stack_check_probe_2()
%4 = tail call i32 (...) @stack_check_probe_loop_1()
%5 = tail call i32 (...) @stack_check_probe_loop_2()
ret i32 0
}
extern void libvamphostsdk_v_2_4_present(void) {}


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

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

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

LLVM IR (-O2):
define void @libvamphostsdk_v_2_4_present() {
ret void
}
/* Variables and functions */
scalar_t__ isalnum(unsigned char);
int isenv(unsigned char x) {
  if (isalnum(x))
    return 1;
  else if (x == '_')
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<isenv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
je     113d <isenv+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    115d <isenv+0x4d>
movzbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
jne    1156 <isenv+0x46>
movl   $0x1,-0x4(%rbp)
jmp    115d <isenv+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isenv>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%bl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isenv(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @isalnum(i8 zeroext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %14
8: ; preds = %1
%9 = load i8, i8* %3
%10 = zext i8 %9 to i32
%11 = icmp eq i32 %10, 95
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %14
13: ; preds = %8
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @isenv(i8 zeroext %0) {
%2 = tail call i64 @isalnum(i8 zeroext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 95
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
float *v_zap(float *v, int n) {
  int i;
  for (i = 0; i < n; i++)
    v[i] = 0.0;
  return (v);
}


x86 assembly (clang, -O0):
<v_zap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113c <v_zap+0x3c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <v_zap+0x12>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<v_zap>:
push   %rbx
mov    %rdi,%rbx
test   %esi,%esi
jle    1128 <v_zap+0x18>
mov    %esi,%edx
shl    $0x2,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define float* @v_zap(float* %0, i32 %1) {
%3 = alloca float*
%4 = alloca i32
%5 = alloca i32
store float* %0, float** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = load float*, float** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds float, float* %11, i64 %13
store float 0.000000e+00, float* %14
br label %15
15: ; preds = %10
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
br label %6
18: ; preds = %6
%19 = load float*, float** %3
ret float* %19
}

LLVM IR (-O2):
define float* @v_zap(float* returned writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast float* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %2
ret float* %0
}
/* Variables and functions */
int strlen(char *);
char tolower(char);
void strtolower(char a[], char b[]) {
  for (int i = 0; i < strlen(a); i++) {
    b[i] = tolower(a[i]);
  }
}


x86 assembly (clang, -O0):
<strtolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
cmp    %ecx,%eax
jge    117f <strtolower+0x5f>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <tolower@plt>
mov    %al,%dl
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1137 <strtolower+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtolower>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <strlen@plt>
test   %eax,%eax
jle    1161 <strtolower+0x41>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1040 <tolower@plt>
mov    %al,(%r14,%rbx,1)
add    $0x1,%rbx
mov    %r15,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1140 <strtolower+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @strtolower(i8* %0, i8* nocapture writeonly %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %6, %2
ret void
6: ; preds = %2, %6
%7 = phi i64 [ %12, %6 ], [ 0, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = tail call signext i8 @tolower(i8 signext %9)
%11 = getelementptr inbounds i8, i8* %1, i64 %7
store i8 %10, i8* %11
%12 = add nuw nsw i64 %7, 1
%13 = tail call i32 @strlen(i8* %0)
%14 = sext i32 %13 to i64
%15 = icmp slt i64 %12, %14
br i1 %15, label %6, label %5
}
void callgrind_stop(void) {}


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

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

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

LLVM IR (-O2):
define void @callgrind_stop() {
ret void
}
void ht_trk_e(const char *args, const char **unused) {}


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

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

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

LLVM IR (-O2):
define void @ht_trk_e(i8* nocapture %0, i8** nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void swap(uint32_t *i) {
  char buf;
  char *r = (char *)i;
  buf = r[0];
  r[0] = r[3];
  r[3] = buf;
  buf = r[1];
  r[1] = r[2];
  r[2] = buf;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x18(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x9(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%al
mov    %al,-0x9(%rbp)
mov    -0x18(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x9(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%al
mov    0x3(%rdi),%cl
mov    %cl,(%rdi)
mov    %al,0x3(%rdi)
rolw   $0x8,0x1(%rdi)
ret

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0) {
%2 = bitcast i32* %0 to i8*
%3 = load i8, i8* %2
%4 = getelementptr inbounds i8, i8* %2, i64 3
%5 = load i8, i8* %4
store i8 %5, i8* %2
store i8 %3, i8* %4
%6 = getelementptr inbounds i8, i8* %2, i64 1
%7 = load i8, i8* %6
%8 = getelementptr inbounds i8, i8* %2, i64 2
%9 = load i8, i8* %8
store i8 %9, i8* %6
store i8 %7, i8* %8
ret void
}
void CM_Init(void) {}


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

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

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

LLVM IR (-O2):
define void @CM_Init() {
ret void
}
OP(dd, eb) { op_eb(); }


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <op_eb@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @op_eb()
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_eb()
ret i32 undef
}
/* Variables and functions */
float atanhf(float);
void sAtanh_process(float bIn, float *bOut) { *bOut = atanhf(bIn); }


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

x86 assembly (clang, -O2):
<sAtanh_process>:
push   %rbx
mov    %rdi,%rbx
call   1030 <atanhf@plt>
movss  %xmm0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @sAtanh_process(float %0, float* %1) {
%3 = alloca float
%4 = alloca float*
store float %0, float* %3
store float* %1, float** %4
%5 = load float, float* %3
%6 = call float @atanhf(float %5)
%7 = load float*, float** %4
store float %6, float* %7
ret void
}

LLVM IR (-O2):
define void @sAtanh_process(float %0, float* nocapture writeonly %1) {
%3 = tail call float @atanhf(float %0)
store float %3, float* %1
ret void
}
void foo798(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo798(i32 %0) {
ret void
}
void uart_init() {
  (*(volatile unsigned long *)0x7F008000) &= 0;
  (*(volatile unsigned long *)0x7F008000) = 0x22222222;
  (*(volatile unsigned long *)0x7F005000) = 0x3;
  (*(volatile unsigned long *)0x7F005004) = 0x5;
  (*(volatile unsigned long *)0x7F005008) = 0x1;
  (*(volatile unsigned long *)0x7F00500C) = 0;
  (*(volatile unsigned long *)0x7F005028) = 35;
  (*(volatile unsigned long *)0x7F00502C) = 0x1;
}


x86 assembly (clang, -O0):
<uart_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f008000,%eax
mov    (%rax),%rcx
and    $0x0,%rcx
mov    $0x7f008000,%eax
mov    %rcx,(%rax)
mov    $0x7f008000,%eax
movq   $0x22222222,(%rax)
mov    $0x7f005000,%eax
movq   $0x3,(%rax)
mov    $0x7f005004,%eax
movq   $0x5,(%rax)
mov    $0x7f005008,%eax
movq   $0x1,(%rax)
mov    $0x7f00500c,%eax
movq   $0x0,(%rax)
mov    $0x7f005028,%eax
movq   $0x23,(%rax)
mov    $0x7f00502c,%eax
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_init>:
mov    0x7f008000,%rax
7f
movq   $0x0,0x7f008000
movq   $0x22222222,0x7f008000
7f 22 22 22 22
movq   $0x3,0x7f005000
movq   $0x5,0x7f005004
movq   $0x1,0x7f005008
movq   $0x0,0x7f00500c
movq   $0x23,0x7f005028
movq   $0x1,0x7f00502c
ret

LLVM IR (-O0):
define void @uart_init() {
%1 = load volatile i64, i64* inttoptr (i64 2130739200 to i64*)
%2 = and i64 %1, 0
store volatile i64 %2, i64* inttoptr (i64 2130739200 to i64*)
store volatile i64 572662306, i64* inttoptr (i64 2130739200 to i64*)
store volatile i64 3, i64* inttoptr (i64 2130726912 to i64*)
store volatile i64 5, i64* inttoptr (i64 2130726916 to i64*)
store volatile i64 1, i64* inttoptr (i64 2130726920 to i64*)
store volatile i64 0, i64* inttoptr (i64 2130726924 to i64*)
store volatile i64 35, i64* inttoptr (i64 2130726952 to i64*)
store volatile i64 1, i64* inttoptr (i64 2130726956 to i64*)
ret void
}

LLVM IR (-O2):
define void @uart_init() {
%1 = load volatile i64, i64* inttoptr (i64 2130739200 to i64*)
store volatile i64 0, i64* inttoptr (i64 2130739200 to i64*)
store volatile i64 572662306, i64* inttoptr (i64 2130739200 to i64*)
store volatile i64 3, i64* inttoptr (i64 2130726912 to i64*)
store volatile i64 5, i64* inttoptr (i64 2130726916 to i64*)
store volatile i64 1, i64* inttoptr (i64 2130726920 to i64*)
store volatile i64 0, i64* inttoptr (i64 2130726924 to i64*)
store volatile i64 35, i64* inttoptr (i64 2130726952 to i64*)
store volatile i64 1, i64* inttoptr (i64 2130726956 to i64*)
ret void
}
/* Variables and functions */
int __cmpdi2(long long, long long);
int _COM_CMPNE64(long long a, long long b) { return __cmpdi2(a, b) != 1; }


x86 assembly (clang, -O0):
<_COM_CMPNE64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <__cmpdi2@plt>
cmp    $0x1,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_COM_CMPNE64>:
push   %rax
call   1030 <__cmpdi2@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @_COM_CMPNE64(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = call i32 @__cmpdi2(i64 %5, i64 %6)
%8 = icmp ne i32 %7, 1
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @_COM_CMPNE64(i64 %0, i64 %1) {
%3 = tail call i32 @__cmpdi2(i64 %0, i64 %1)
%4 = icmp ne i32 %3, 1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
float __ESBMC_fabsf(float);
float fabsf(float f) { return __ESBMC_fabsf(f); }


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

x86 assembly (clang, -O2):
<fabsf>:
jmp    1030 <__ESBMC_fabsf@plt>

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

LLVM IR (-O2):
define float @fabsf(float %0) {
%2 = tail call float @__ESBMC_fabsf(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, const char *argv[]) {
  printf("haha\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%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
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [5 x i8] c"haha\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret i32 0
}
char GetEncoding6() { return 0xca; }


x86 assembly (clang, -O0):
<GetEncoding6>:
push   %rbp
mov    %rsp,%rbp
mov    $0xca,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GetEncoding6>:
mov    $0xca,%al
ret

LLVM IR (-O0):
define signext i8 @GetEncoding6() {
ret i8 -54
}

LLVM IR (-O2):
define signext i8 @GetEncoding6() {
ret i8 -54
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int isMachineLittleEndian() {
  char magic[4] = {0x01, 0x02, 0x03, 0x04};
  unsigned long *longMagic = (unsigned long *)magic;
  if (*longMagic == 0x01020304)
    return 0;
  if (*longMagic == 0x04030201)
    return 1;
  fprintf(stderr, "Funky Byte Order, I give Up!!\n");
  exit(0);
}


x86 assembly (clang, -O0):
<isMachineLittleEndian>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpq   $0x1020304,(%rax)
jne    1156 <isMachineLittleEndian+0x36>
movl   $0x0,-0x4(%rbp)
jmp    118f <isMachineLittleEndian+0x6f>
mov    -0x10(%rbp),%rax
cmpq   $0x4030201,(%rax)
jne    1173 <isMachineLittleEndian+0x53>
movl   $0x1,-0x4(%rbp)
jmp    118f <isMachineLittleEndian+0x6f>
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
lea    0xe81(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.isMachineLittleEndian.magic = [4 x i8] c"\01\02\03\04"
@stderr = global i32 0
@.str = [31 x i8] c"Funky Byte Order, I give Up!!\0A\00"
define i32 @isMachineLittleEndian() {
%1 = alloca i32
%2 = alloca [4 x i8]
%3 = alloca i64*
%4 = bitcast [4 x i8]* %2 to i8*
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%6 = bitcast i8* %5 to i64*
store i64* %6, i64** %3
%7 = load i64*, i64** %3
%8 = load i64, i64* %7
%9 = icmp eq i64 %8, 16909060
br i1 %9, label %10, label %11
10: ; preds = %0
store i32 0, i32* %1
br label %20
11: ; preds = %0
%12 = load i64*, i64** %3
%13 = load i64, i64* %12
%14 = icmp eq i64 %13, 67305985
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 1, i32* %1
br label %20
16: ; preds = %11
%17 = load i32, i32* @stderr
%18 = call i32 @fprintf(i32 %17, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
%19 = call i32 @exit(i32 0)
unreachable
20: ; preds = %15, %10
%21 = load i32, i32* %1
ret i32 %21
}

LLVM IR (-O2):
@stderr = global i32 0
define i32 @isMachineLittleEndian() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ mgrSendMessageToLedController(char *);
int /*<<< orphan*/ mgrSendMessageToSndModule(int, char *, int /*<<< orphan*/ *);
int mgrTuningStart(int code, void *arg1, void *arg2) {
  ;
  mgrSendMessageToLedController("/led/blink/red/green");
  mgrSendMessageToLedController("/led/orange/on");
  mgrSendMessageToSndModule((8004), "/tuner/tune/start", NULL);
  return 0;
}


x86 assembly (clang, -O0):
<mgrTuningStart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xec6(%rip),%rdi
call   1040 <mgrSendMessageToLedController@plt>
lea    0xecf(%rip),%rdi
call   1040 <mgrSendMessageToLedController@plt>
mov    $0x1f44,%edi
lea    0xecd(%rip),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <mgrSendMessageToSndModule@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mgrTuningStart>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <mgrSendMessageToLedController@plt>
lea    0xee1(%rip),%rdi
call   1040 <mgrSendMessageToLedController@plt>
lea    0xee4(%rip),%rsi
mov    $0x1f44,%edi
xor    %edx,%edx
call   1030 <mgrSendMessageToSndModule@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"/led/blink/red/green\00"
@.str.1 = [15 x i8] c"/led/orange/on\00"
@.str.2 = [18 x i8] c"/tuner/tune/start\00"
define i32 @mgrTuningStart(i32 %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = call i32 @mgrSendMessageToLedController(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @mgrSendMessageToLedController(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @mgrSendMessageToSndModule(i32 8004, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32* null)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"/led/blink/red/green\00"
@.str.1 = [15 x i8] c"/led/orange/on\00"
@.str.2 = [18 x i8] c"/tuner/tune/start\00"
define i32 @mgrTuningStart(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @mgrSendMessageToLedController(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @mgrSendMessageToLedController(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @mgrSendMessageToSndModule(i32 8004, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32* null)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ shutdown();
void sigint_handler(int signum) {
  printf("\tCancelled!\n");
  shutdown();
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<sigint_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <shutdown@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<sigint_handler>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <shutdown@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"\09Cancelled!\0A\00"
@EXIT_FAILURE = global i32 0
define void @sigint_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @shutdown()
%5 = load i32, i32* @EXIT_FAILURE
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [12 x i8] c"\09Cancelled!\00"
define void @sigint_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @shutdown()
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
long zz_posix_get_current_thread_id();
long ZzThreadGetCurrentThreadID() { return zz_posix_get_current_thread_id(); }


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

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

LLVM IR (-O0):
define i64 @ZzThreadGetCurrentThreadID() {
%1 = call i64 (...) @zz_posix_get_current_thread_id()
ret i64 %1
}

LLVM IR (-O2):
define i64 @ZzThreadGetCurrentThreadID() {
%1 = tail call i64 (...) @zz_posix_get_current_thread_id()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ power(long long, long long, long long);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, long long *, long long *, long long *);
int main() {
  long long base, exponent, p;
  scanf("%lli %lli %lli", &base, &exponent, &p);
  printf("The result of given expression is id %lli", power(base, exponent, p));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1050 <scanf@plt>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <power@plt>
mov    %eax,%esi
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xec5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1050 <scanf@plt>
mov    0x10(%rsp),%rdi
mov    0x8(%rsp),%rsi
mov    (%rsp),%rdx
call   1030 <power@plt>
lea    0xea8(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"%lli %lli %lli\00"
@.str.1 = [42 x i8] c"The result of given expression is id %lli\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64* %2, i64* %3, i64* %4)
%6 = load i64, i64* %2
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = call i32 @power(i64 %6, i64 %7, i64 %8)
%10 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"%lli %lli %lli\00"
@.str.1 = [42 x i8] c"The result of given expression is id %lli\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i64
%4 = bitcast i64* %1 to i8*
%5 = bitcast i64* %2 to i8*
%6 = bitcast i64* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2, i64* %3)
%8 = load i64, i64* %1
%9 = load i64, i64* %2
%10 = load i64, i64* %3
%11 = call i32 @power(i64 %8, i64 %9, i64 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0), i32 %11)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gen_call(char *);
int /*<<< orphan*/ gen_pop();
gen_and() {
  gen_pop();
  gen_call("ccand");
}


x86 assembly (clang, -O0):
<gen_and>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <gen_pop@plt>
lea    0xeca(%rip),%rdi
call   1040 <gen_call@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_and>:
push   %rax
xor    %eax,%eax
call   1030 <gen_pop@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <gen_call@plt>

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

LLVM IR (-O2):
@.str = [6 x i8] c"ccand\00"
define i32 @gen_and() {
%1 = tail call i32 (...) @gen_pop()
%2 = tail call i32 @gen_call(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS12_BAGS;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS12_BAGS_it;
void PKCS12_BAGS_free(PKCS12_BAGS *a) {
  ASN1_item_free((ASN1_VALUE *)a, &PKCS12_BAGS_it);
}


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

x86 assembly (clang, -O2):
<PKCS12_BAGS_free>:
mov    0x2ec9(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

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

LLVM IR (-O2):
@PKCS12_BAGS_it = global i32 0
define void @PKCS12_BAGS_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @PKCS12_BAGS_it)
ret void
}
/* Type definitions */
struct stat {
  size_t st_size;
};

/* Variables and functions */
int /*<<< orphan*/ stat(char *, struct stat *);
size_t get_file_size(char *path) {
  struct stat st;
  if (path == NULL) {
    return -1;
  }
  stat(path, &st);
  return st.st_size;
}


x86 assembly (clang, -O0):
<get_file_size>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <get_file_size+0x24>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    1149 <get_file_size+0x39>
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_file_size>:
test   %rdi,%rdi
je     1127 <get_file_size+0x17>
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    (%rsp),%rax
add    $0x8,%rsp
ret
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
%struct.stat = type { i64 }
define i64 @get_file_size(i8* %0) {
%2 = alloca i64
%3 = alloca i8*
%4 = alloca %struct.stat
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 i64 -1, i64* %2
br label %13
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i32 @stat(i8* %9, %struct.stat* %4)
%11 = getelementptr inbounds %struct.stat, %struct.stat* %4, i32 0, i32 0
%12 = load i64, i64* %11
store i64 %12, i64* %2
br label %13
13: ; preds = %8, %7
%14 = load i64, i64* %2
ret i64 %14
}

LLVM IR (-O2):
%struct.stat = type { i64 }
define i64 @get_file_size(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = icmp eq i8* %0, null
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = call i32 @stat(i8* %0, %struct.stat* %2)
%7 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%8 = load i64, i64* %7
br label %9
9: ; preds = %1, %5
%10 = phi i64 [ %8, %5 ], [ -1, %1 ]
ret i64 %10
}
unsigned long ffsl(unsigned long word) {
  asm("rep; bsf %1,%0" : "=r"(word) : "rm"(word));
  return word;
}


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

x86 assembly (clang, -O2):
<ffsl>:
mov    %rdi,-0x8(%rsp)
tzcnt  -0x8(%rsp),%rax
ret

LLVM IR (-O0):
define i64 @ffsl(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 asm "rep; bsf $1,$0", "=r,rm,~{dirflag},~{fpsr},~{flags}"(i64 %3)
store i64 %4, i64* %2
%5 = load i64, i64* %2
ret i64 %5
}

LLVM IR (-O2):
define i64 @ffsl(i64 %0) {
%2 = tail call i64 asm "rep; bsf $1,$0", "=r,rm,~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret i64 %2
}
void elog(a) const char *const a;
{ write(2, a, strlen(a)); }


x86 assembly (clang, -O0):
<elog>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x10(%rbp),%rsi
mov    %rax,%rdx
mov    $0x2,%edi
mov    $0x0,%al
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<elog>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
mov    $0x2,%edi
mov    %rbx,%rsi
mov    %rax,%rdx
xor    %eax,%eax
pop    %rbx
jmp    1030 <write@plt>

LLVM IR (-O0):
define void @elog(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 2, i8* %3, i64 %5)
ret void
}

LLVM IR (-O2):
define void @elog(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = tail call i32 (i32, i8*, i64, ...) bitcast (i32 (...)* @write to i32 (i32, i8*, i64, ...)*)(i32 2, i8* %0, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ baz();
__attribute__((always_)) int bar() {
out:
  baz();
  goto out;
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <bar+0x9>
mov    $0x0,%al
call   1030 <baz@plt>
jmp    1119 <bar+0x9>

x86 assembly (clang, -O2):
<bar>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <baz@plt>
jmp    1120 <bar+0x10>

LLVM IR (-O0):
define i32 @bar() {
br label %1
1: ; preds = %1, %0
%2 = call i32 (...) @baz()
br label %1
}

LLVM IR (-O2):
define i32 @bar() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @baz()
br label %1
}
int main() {
  volatile int foo[10][10][10];
  foo[9][10][0] = 0;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x [10 x [10 x i32]]]
store i32 0, i32* %1
%3 = getelementptr inbounds [10 x [10 x [10 x i32]]], [10 x [10 x [10 x i32]]]* %2, i64 0, i64 9
%4 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %3, i64 0, i64 10
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %4, i64 0, i64 0
store volatile i32 0, i32* %5
ret i32 0
}

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

/* Variables and functions */
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/, char const *,
                            int /*<<< orphan*/);
void printf_stderr(const char *fmt, va_list ap) { vfprintf(stderr, fmt, ap); }


x86 assembly (clang, -O0):
<printf_stderr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <vfprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf_stderr>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <vfprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
define void @printf_stderr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @vfprintf(i32 %5, i8* %6, i32 %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
define void @printf_stderr(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ malloc(int);
int /*<<< orphan*/ sleep(int);
int main(int argc, char **argv) {
  for (;;) {
    malloc(1000);
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x3e8,%edi
call   1030 <malloc@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1136 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x3e8,%edi
call   1030 <malloc@plt>
mov    $0x1,%edi
call   1040 <sleep@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %6
6: ; preds = %6, %2
%7 = call i32 @malloc(i32 1000)
%8 = call i32 @sleep(i32 1)
br label %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 @malloc(i32 1000)
%5 = tail call i32 @sleep(i32 1)
br label %3
}
/* Type definitions */
struct vector {
  int dummy;
};

/* Variables and functions */
float sqrt(int /*<<< orphan*/);
int /*<<< orphan*/ vec_length_squared(struct vector const *);
float vec_length(const struct vector *a) { return sqrt(vec_length_squared(a)); }


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

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

LLVM IR (-O0):
%struct.vector = type { i32 }
define float @vec_length(%struct.vector* %0) {
%2 = alloca %struct.vector*
store %struct.vector* %0, %struct.vector** %2
%3 = load %struct.vector*, %struct.vector** %2
%4 = call i32 @vec_length_squared(%struct.vector* %3)
%5 = call float @sqrt(i32 %4)
ret float %5
}

LLVM IR (-O2):
%struct.vector = type { i32 }
define float @vec_length(%struct.vector* %0) {
%2 = tail call i32 @vec_length_squared(%struct.vector* %0)
%3 = tail call float @sqrt(i32 %2)
ret float %3
}
void RTSemEventMultiDestroy(void) {}


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

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

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

LLVM IR (-O2):
define void @RTSemEventMultiDestroy() {
ret void
}
int main(int argc, const char *argv[]) {
  if (argc)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1128 <main+0x28>
movl   $0x0,-0x4(%rbp)
jmp    112f <main+0x2f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp eq i32 %0, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *fgets(char *, size_t, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
char *getinput(char *buffer, size_t buflen) {
  printf("$$ ");
  return fgets(buffer, buflen, stdin);
}


x86 assembly (clang, -O0):
<getinput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e9d(%rip),%rax
mov    (%rax),%edx
call   1040 <fgets@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getinput>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <fgets@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"$$ \00"
@stdin = global i32 0
define i8* @getinput(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = load i32, i32* @stdin
%9 = call i8* @fgets(i8* %6, i64 %7, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
@.str = [4 x i8] c"$$ \00"
@stdin = global i32 0
define i8* @getinput(i8* %0, i64 %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = tail call i8* @fgets(i8* %0, i64 %1, i32 %4)
ret i8* %5
}
int test_imm_43int16_reg(short val) {
  return ((val) & (0x43 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_43int16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%edx
and    $0x43,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_43int16_reg>:
test   $0x43,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_43int16_reg(i16 signext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = sext i16 %3 to i32
%5 = and i32 %4, 67
%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_43int16_reg(i16 signext %0) {
%2 = and i16 %0, 67
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int pathcon_nm4_n_in(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @pathcon_nm4_n_in() {
ret i32 2
}

LLVM IR (-O2):
define i32 @pathcon_nm4_n_in() {
ret i32 2
}
/* Type definitions */
struct ringbuffer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ringbuffer_delete(struct ringbuffer *);
struct ringbuffer *ringbuffer_new(int);
int /*<<< orphan*/ test(struct ringbuffer *);
int main() {
  struct ringbuffer *rb = ringbuffer_new(128);
  test(rb);
  ringbuffer_delete(rb);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x80,%edi
call   1040 <ringbuffer_new@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <test@plt>
mov    -0x10(%rbp),%rdi
call   1030 <ringbuffer_delete@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x80,%edi
call   1040 <ringbuffer_new@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <test@plt>
mov    %rbx,%rdi
call   1030 <ringbuffer_delete@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.ringbuffer = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.ringbuffer*
store i32 0, i32* %1
%3 = call %struct.ringbuffer* @ringbuffer_new(i32 128)
store %struct.ringbuffer* %3, %struct.ringbuffer** %2
%4 = load %struct.ringbuffer*, %struct.ringbuffer** %2
%5 = call i32 @test(%struct.ringbuffer* %4)
%6 = load %struct.ringbuffer*, %struct.ringbuffer** %2
%7 = call i32 @ringbuffer_delete(%struct.ringbuffer* %6)
ret i32 0
}

LLVM IR (-O2):
%struct.ringbuffer = type { i32 }
define i32 @main() {
%1 = tail call %struct.ringbuffer* @ringbuffer_new(i32 128)
%2 = tail call i32 @test(%struct.ringbuffer* %1)
%3 = tail call i32 @ringbuffer_delete(%struct.ringbuffer* %1)
ret i32 0
}