xunge/DecIR huggingface dataset:
/* Variables and functions */
double round_up(double, double);
double rs_rainflow_round_up(double x, double scale) {
  return (x == 0.0 ? 0.0 : round_up(x, scale));
}


x86 assembly (clang, -O0):
<rs_rainflow_round_up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1147 <rs_rainflow_round_up+0x37>
jp     1147 <rs_rainflow_round_up+0x37>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    115b <rs_rainflow_round_up+0x4b>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <round_up@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rs_rainflow_round_up>:
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
jne    1121 <rs_rainflow_round_up+0x11>
jp     1121 <rs_rainflow_round_up+0x11>
xorpd  %xmm0,%xmm0
ret
jmp    1030 <round_up@plt>

LLVM IR (-O0):
define double @rs_rainflow_round_up(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = fcmp oeq double %5, 0.000000e+00
br i1 %6, label %7, label %8
7: ; preds = %2
br label %12
8: ; preds = %2
%9 = load double, double* %3
%10 = load double, double* %4
%11 = call double @round_up(double %9, double %10)
br label %12
12: ; preds = %8, %7
%13 = phi double [ 0.000000e+00, %7 ], [ %11, %8 ]
ret double %13
}

LLVM IR (-O2):
define double @rs_rainflow_round_up(double %0, double %1) {
%3 = fcmp oeq double %0, 0.000000e+00
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call double @round_up(double %0, double %1)
br label %6
6: ; preds = %2, %4
%7 = phi double [ %5, %4 ], [ 0.000000e+00, %2 ]
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int const);
void pt(const int a[], int len) {
  int i = 0;
  for (; i < len; i++) {
    printf("a[%d]= %d \n", i, a[i]);
  }
  return;
}


x86 assembly (clang, -O0):
<pt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <pt+0x4a>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <pt+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pt>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1147 <pt+0x37>
mov    %rdi,%r14
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <pt+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [12 x i8] c"a[%d]= %d \0A\00"
define void @pt(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %21
10: ; preds = %6
%11 = load i32, i32* %5
%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 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %16)
br label %18
18: ; preds = %10
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"a[%d]= %d \0A\00"
define void @pt(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 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret void
}
/* Type definitions */
struct stack_st_OPENSSL_BLOCK {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
scalar_t__ OPENSSL_sk_delete_ptr(int /*<<< orphan*/ *, void const *);
void *sk_OPENSSL_BLOCK_delete_ptr(struct stack_st_OPENSSL_BLOCK *sk,
                                  void *ptr) {
  return (void *)OPENSSL_sk_delete_ptr((OPENSSL_STACK *)sk, (const void *)ptr);
}


x86 assembly (clang, -O0):
<sk_OPENSSL_BLOCK_delete_ptr>:
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 <OPENSSL_sk_delete_ptr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sk_OPENSSL_BLOCK_delete_ptr>:
jmp    1030 <OPENSSL_sk_delete_ptr@plt>

LLVM IR (-O0):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define i8* @sk_OPENSSL_BLOCK_delete_ptr(%struct.stack_st_OPENSSL_BLOCK* %0, i8* %1) {
%3 = alloca %struct.stack_st_OPENSSL_BLOCK*
%4 = alloca i8*
store %struct.stack_st_OPENSSL_BLOCK* %0, %struct.stack_st_OPENSSL_BLOCK** %3
store i8* %1, i8** %4
%5 = load %struct.stack_st_OPENSSL_BLOCK*, %struct.stack_st_OPENSSL_BLOCK** %3
%6 = bitcast %struct.stack_st_OPENSSL_BLOCK* %5 to i32*
%7 = load i8*, i8** %4
%8 = call i64 @OPENSSL_sk_delete_ptr(i32* %6, i8* %7)
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define i8* @sk_OPENSSL_BLOCK_delete_ptr(%struct.stack_st_OPENSSL_BLOCK* %0, i8* %1) {
%3 = getelementptr %struct.stack_st_OPENSSL_BLOCK, %struct.stack_st_OPENSSL_BLOCK* %0, i64 0, i32 0
%4 = tail call i64 @OPENSSL_sk_delete_ptr(i32* %3, i8* %1)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
scalar_t__ memcmp(char *, char *, int);
int /*<<< orphan*/ uart_puts(char *);
void calc_parse(char *cmd, int *calc_on) {
  if (memcmp(cmd, "q", sizeof("q")) == 0) {
    *calc_on = 0;
    return;
  }
  uart_puts("caaaaaaaaaaaaalc");
  uart_puts(cmd);
}


x86 assembly (clang, -O0):
<calc_parse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec5(%rip),%rsi
mov    $0x2,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
jne    115e <calc_parse+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
jmp    1173 <calc_parse+0x53>
lea    0xe9d(%rip),%rdi
call   1040 <uart_puts@plt>
mov    -0x8(%rbp),%rdi
call   1040 <uart_puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc_parse>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rsi
mov    $0x2,%edx
call   1030 <memcmp@plt>
test   %rax,%rax
je     115b <calc_parse+0x3b>
lea    0xebb(%rip),%rdi
call   1040 <uart_puts@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <uart_puts@plt>
movl   $0x0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"q\00"
@.str.1 = [17 x i8] c"caaaaaaaaaaaaalc\00"
define void @calc_parse(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = call i64 @memcmp(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 2)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32*, i32** %4
store i32 0, i32* %9
br label %14
10: ; preds = %2
%11 = call i32 @uart_puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%12 = load i8*, i8** %3
%13 = call i32 @uart_puts(i8* %12)
br label %14
14: ; preds = %10, %8
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"q\00"
@.str.1 = [17 x i8] c"caaaaaaaaaaaaalc\00"
define void @calc_parse(i8* %0, i32* nocapture writeonly %1) {
%3 = tail call i64 @memcmp(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
store i32 0, i32* %1
br label %9
6: ; preds = %2
%7 = tail call i32 @uart_puts(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @uart_puts(i8* %0)
br label %9
9: ; preds = %6, %5
ret void
}
/* Variables and functions */
int binomial(int, int);
int calculateNumberOfWaysToDistributeNItemsAmongKPersons(int n, int k) {
  return binomial(n - 1, k - 1);
}


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

x86 assembly (clang, -O2):
<calculateNumberOfWaysToDistributeNItemsAmongKPersons>:
add    $0xffffffff,%edi
add    $0xffffffff,%esi
jmp    1030 <binomial@plt>

LLVM IR (-O0):
define i32 @calculateNumberOfWaysToDistributeNItemsAmongKPersons(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = sub nsw i32 %5, 1
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 1
%9 = call i32 @binomial(i32 %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @calculateNumberOfWaysToDistributeNItemsAmongKPersons(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -1
%4 = add nsw i32 %1, -1
%5 = tail call i32 @binomial(i32 %3, i32 %4)
ret i32 %5
}
/* Type definitions */
struct rbtree_node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ is_black(struct rbtree_node *);
int is_red(struct rbtree_node *node) { return !is_black(node); }


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

x86 assembly (clang, -O2):
<is_red>:
push   %rax
call   1030 <is_black@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.rbtree_node = type { i32 }
define i32 @is_red(%struct.rbtree_node* %0) {
%2 = alloca %struct.rbtree_node*
store %struct.rbtree_node* %0, %struct.rbtree_node** %2
%3 = load %struct.rbtree_node*, %struct.rbtree_node** %2
%4 = call i32 @is_black(%struct.rbtree_node* %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.rbtree_node = type { i32 }
define i32 @is_red(%struct.rbtree_node* %0) {
%2 = tail call i32 @is_black(%struct.rbtree_node* %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
float sqrtf(float);
float EaseCircOut(float t, float b, float c, float d) {
  t = t / d - 1.0f;
  return (c * sqrtf(1.0f - t * t) + b);
}


x86 assembly (clang, -O0):
<EaseCircOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
movss  0xec2(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm1,%xmm0
movss  0xe8c(%rip),%xmm1
addss  %xmm1,%xmm0
call   1030 <sqrtf@plt>
movaps %xmm0,%xmm2
movss  -0x14(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EaseCircOut>:
push   %rax
movaps %xmm0,%xmm4
divss  %xmm3,%xmm4
addss  0xee0(%rip),%xmm4
mulss  %xmm4,%xmm4
movss  0xed8(%rip),%xmm0
subss  %xmm4,%xmm0
xorps  %xmm3,%xmm3
ucomiss %xmm3,%xmm0
jb     113e <EaseCircOut+0x2e>
sqrtss %xmm0,%xmm0
jmp    1159 <EaseCircOut+0x49>
movss  %xmm2,0x4(%rsp)
movss  %xmm1,(%rsp)
call   1030 <sqrtf@plt>
movss  (%rsp),%xmm1
movss  0x4(%rsp),%xmm2
mulss  %xmm0,%xmm2
addss  %xmm1,%xmm2
movaps %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @EaseCircOut(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %8
%11 = fdiv float %9, %10
%12 = fsub float %11, 1.000000e+00
store float %12, float* %5
%13 = load float, float* %7
%14 = load float, float* %5
%15 = load float, float* %5
%16 = fneg float %14
%17 = call float @llvm.fmuladd.f32(float %16, float %15, float 1.000000e+00)
%18 = call float @sqrtf(float %17)
%19 = load float, float* %6
%20 = call float @llvm.fmuladd.f32(float %13, float %18, float %19)
ret float %20
}

LLVM IR (-O2):
define float @EaseCircOut(float %0, float %1, float %2, float %3) {
%5 = fdiv float %0, %3
%6 = fadd float %5, -1.000000e+00
%7 = fneg float %6
%8 = tail call float @llvm.fmuladd.f32(float %7, float %6, float 1.000000e+00)
%9 = tail call float @sqrtf(float %8)
%10 = tail call float @llvm.fmuladd.f32(float %2, float %9, float %1)
ret float %10
}
/* Type definitions */
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
int /*<<< orphan*/ crush_hash32_rjenkins1_3(int /*<<< orphan*/,
                                            int /*<<< orphan*/,
                                            int /*<<< orphan*/);
__u32 crush_hash32_3(int type, __u32 a, __u32 b, __u32 c) {
  switch (type) {
  case 0:
    return crush_hash32_rjenkins1_3(a, b, c);
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<crush_hash32_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%eax
test   %eax,%eax
jne    114a <crush_hash32_3+0x3a>
jmp    1134 <crush_hash32_3+0x24>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <crush_hash32_rjenkins1_3@plt>
mov    %eax,-0x4(%rbp)
jmp    1151 <crush_hash32_3+0x41>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crush_hash32_3>:
test   %edi,%edi
je     1117 <crush_hash32_3+0x7>
xor    %eax,%eax
ret
mov    %esi,%edi
mov    %edx,%esi
mov    %ecx,%edx
jmp    1030 <crush_hash32_rjenkins1_3@plt>

LLVM IR (-O0):
define i32 @crush_hash32_3(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
%10 = load i32, i32* %6
switch i32 %10, label %16 [
i32 0, label %11
]
11: ; preds = %4
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = call i32 @crush_hash32_rjenkins1_3(i32 %12, i32 %13, i32 %14)
store i32 %15, i32* %5
br label %17
16: ; preds = %4
store i32 0, i32* %5
br label %17
17: ; preds = %16, %11
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
define i32 @crush_hash32_3(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %0, 0
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = tail call i32 @crush_hash32_rjenkins1_3(i32 %1, i32 %2, i32 %3)
br label %8
8: ; preds = %4, %6
%9 = phi i32 [ %7, %6 ], [ 0, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ TimerBeepAdv(int, unsigned long long);
void TimerBeep() { TimerBeepAdv(1000, 1ULL << 32); }


x86 assembly (clang, -O0):
<TimerBeep>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3e8,%edi
movabs $0x100000000,%rsi
call   1030 <TimerBeepAdv@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<TimerBeep>:
movabs $0x100000000,%rsi
mov    $0x3e8,%edi
jmp    1030 <TimerBeepAdv@plt>

LLVM IR (-O0):
define void @TimerBeep() {
%1 = call i32 @TimerBeepAdv(i32 1000, i64 4294967296)
ret void
}

LLVM IR (-O2):
define void @TimerBeep() {
%1 = tail call i32 @TimerBeepAdv(i32 1000, i64 4294967296)
ret void
}
/* Variables and functions */
int ENOSYS;
int defaultenv_load(const char *dir, unsigned flags) { return -ENOSYS; }


x86 assembly (clang, -O0):
<defaultenv_load>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    0x2ed4(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<defaultenv_load>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @defaultenv_load(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOSYS
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @defaultenv_load(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @ENOSYS
%4 = sub nsw i32 0, %3
ret i32 %4
}
/* Type definitions */
struct qt_atom {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct qt_atom *);
void free_mdhd(struct qt_atom *self) { free(self); }


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

x86 assembly (clang, -O2):
<free_mdhd>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.qt_atom = type { i32 }
define void @free_mdhd(%struct.qt_atom* nocapture %0) {
%2 = tail call i32 @free(%struct.qt_atom* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fcloseall();
int /*<<< orphan*/ printf(char *);
void closingRecver() {
  printf("Closing Receiver\n");
  int i = 0;
  fcloseall();
  exit(2);
}


x86 assembly (clang, -O0):
<closingRecver>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <fcloseall@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [18 x i8] c"Closing Receiver\0A\00"
define void @closingRecver() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
%3 = call i32 (...) @fcloseall()
%4 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@str = [17 x i8] c"Closing Receiver\00"
define void @closingRecver() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @fcloseall()
%3 = tail call i32 @exit(i32 2)
unreachable
}
int hexval(c)
int c;
{
  if (c >= '0' && c <= '9')
    return (c - '0');
  if (c >= 'A' && c <= 'F')
    return (c - 'A' + 10);
  if (c >= 'a' && c <= 'f')
    return (c - 'a' + 10);
  return (-1);
}


x86 assembly (clang, -O0):
<hexval>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1129 <hexval+0x29>
cmpl   $0x39,-0x8(%rbp)
jg     1129 <hexval+0x29>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <hexval+0x7a>
cmpl   $0x41,-0x8(%rbp)
jl     114e <hexval+0x4e>
cmpl   $0x46,-0x8(%rbp)
jg     114e <hexval+0x4e>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <hexval+0x7a>
cmpl   $0x61,-0x8(%rbp)
jl     1173 <hexval+0x73>
cmpl   $0x66,-0x8(%rbp)
jg     1173 <hexval+0x73>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <hexval+0x7a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexval>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
jb     1127 <hexval+0x27>
lea    -0x41(%rdi),%eax
cmp    $0x5,%eax
ja     1116 <hexval+0x16>
add    $0xffffffc9,%edi
mov    %edi,%eax
ret
lea    -0x61(%rdi),%eax
add    $0xffffffa9,%edi
cmp    $0x6,%eax
mov    $0xffffffff,%eax
cmovb  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @hexval(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = add i32 %0, -65
%6 = icmp ult i32 %5, 6
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = add nsw i32 %0, -55
br label %14
9: ; preds = %4
%10 = add i32 %0, -97
%11 = icmp ult i32 %10, 6
%12 = add nsw i32 %0, -87
%13 = select i1 %11, i32 %12, i32 -1
br label %14
14: ; preds = %1, %9, %7
%15 = phi i32 [ %8, %7 ], [ %13, %9 ], [ %2, %1 ]
ret i32 %15
}
void kol_key_mode_set(unsigned mode) {
  asm("int $0x40" ::"a"(66), "b"(1), "c"(mode));
}


x86 assembly (clang, -O0):
<kol_key_mode_set>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    $0x42,%eax
mov    $0x1,%ebx
int    $0x40
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<kol_key_mode_set>:
push   %rbx
mov    %edi,%ecx
mov    $0x42,%eax
mov    $0x1,%ebx
int    $0x40
pop    %rbx
ret

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

LLVM IR (-O2):
define void @kol_key_mode_set(i32 %0) {
tail call void asm sideeffect "int $$0x40", "{ax},{bx},{cx},~{dirflag},~{fpsr},~{flags}"(i32 66, i32 1, i32 %0)
ret void
}
void fun(int a) {}


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

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

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

LLVM IR (-O2):
define void @fun(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int trailingZeroes(int);
void test(int n) { printf("tz(%d) = %d\n", n, trailingZeroes(n)); }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <trailingZeroes@plt>
mov    -0x8(%rbp),%esi
mov    %eax,%edx
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbx
mov    %edi,%ebx
call   1040 <trailingZeroes@plt>
lea    0xed1(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"tz(%d) = %d\0A\00"
define void @test(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @trailingZeroes(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"tz(%d) = %d\0A\00"
define void @test(i32 %0) {
%2 = tail call i32 @trailingZeroes(i32 %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %2)
ret void
}
void Profiler_StartMSAAResolve() {}


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

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

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

LLVM IR (-O2):
define void @Profiler_StartMSAAResolve() {
ret void
}
int execute_security() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_security() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char const *const);
void uninitvar_strcat(char *dest, const char *const source) {
  char *deststr1, *deststr2;
  char *srcstr;
  (void)strcat(deststr1, srcstr);
  (void)strcat(dest, srcstr);
  (void)strcat(deststr2, source);
  (void)strcat(dest, source);
}


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

x86 assembly (clang, -O2):
<uninitvar_strcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strcat@plt>
mov    %rbx,%rdi
call   1030 <strcat@plt>
mov    %r14,%rsi
call   1030 <strcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcat@plt>

LLVM IR (-O0):
define void @uninitvar_strcat(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %7
%10 = call i32 @strcat(i8* %8, i8* %9)
%11 = load i8*, i8** %3
%12 = load i8*, i8** %7
%13 = call i32 @strcat(i8* %11, i8* %12)
%14 = load i8*, i8** %6
%15 = load i8*, i8** %4
%16 = call i32 @strcat(i8* %14, i8* %15)
%17 = load i8*, i8** %3
%18 = load i8*, i8** %4
%19 = call i32 @strcat(i8* %17, i8* %18)
ret void
}

LLVM IR (-O2):
define void @uninitvar_strcat(i8* %0, i8* %1) {
%3 = tail call i32 @strcat(i8* undef, i8* undef)
%4 = tail call i32 @strcat(i8* %0, i8* undef)
%5 = tail call i32 @strcat(i8* undef, i8* %1)
%6 = tail call i32 @strcat(i8* %0, i8* %1)
ret void
}
/* Variables and functions */
double pow(int, int);
int t1_eta(int, int, double);
double t1_a(int i, int j, double rij) {
  return pow(1 + pow(0.0, 22.956) * pow(t1_eta(i, j, rij), 22.956),
             -1 / (2 * 22.956));
}


x86 assembly (clang, -O0):
<t1_a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
xor    %edi,%edi
mov    $0x16,%esi
call   1040 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
call   1030 <t1_eta@plt>
mov    %eax,%edi
mov    $0x16,%esi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe8c(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
xor    %esi,%esi
call   1040 <pow@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1_a>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
mov    $0x16,%esi
call   1040 <pow@plt>
movsd  %xmm0,0x10(%rsp)
mov    %ebp,%edi
mov    %ebx,%esi
movsd  0x8(%rsp),%xmm0
call   1030 <t1_eta@plt>
mov    %eax,%edi
mov    $0x16,%esi
call   1040 <pow@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0xe95(%rip),%xmm0
cvttsd2si %xmm0,%edi
xor    %esi,%esi
add    $0x18,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <pow@plt>

LLVM IR (-O0):
define double @t1_a(i32 %0, i32 %1, double %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
store double %2, double* %6
%7 = call double @pow(i32 0, i32 22)
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load double, double* %6
%11 = call i32 @t1_eta(i32 %8, i32 %9, double %10)
%12 = call double @pow(i32 %11, i32 22)
%13 = call double @llvm.fmuladd.f64(double %7, double %12, double 1.000000e+00)
%14 = fptosi double %13 to i32
%15 = call double @pow(i32 %14, i32 0)
ret double %15
}

LLVM IR (-O2):
define double @t1_a(i32 %0, i32 %1, double %2) {
%4 = tail call double @pow(i32 0, i32 22)
%5 = tail call i32 @t1_eta(i32 %0, i32 %1, double %2)
%6 = tail call double @pow(i32 %5, i32 22)
%7 = tail call double @llvm.fmuladd.f64(double %4, double %6, double 1.000000e+00)
%8 = fptosi double %7 to i32
%9 = tail call double @pow(i32 %8, i32 0)
ret double %9
}
void gtCSVDeaccess(const char *pszFilename) {}


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

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

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

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

/* Variables and functions */
scalar_t__ memcmp(int /*<<< orphan*/ const *, int /*<<< orphan*/ const *, int);
bool glyphs_match(const uint8_t *g1, const uint8_t *g2) {
  return (memcmp(g1, g2, 16) == 0);
}


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

x86 assembly (clang, -O2):
<glyphs_match>:
push   %rax
mov    $0x10,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @glyphs_match(i32* %0, i32* %1) {
%3 = tail call i64 @memcmp(i32* %0, i32* %1, i32 16)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int n = 50;
  int i;
  int a = 0, b = 1, c;
  for (i = 1; i <= n; i++) {
    printf("%d ", a);
    c = a + b;
    a = b;
    b = c;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x32,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     1179 <main+0x69>
mov    -0x10(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113b <main+0x2b>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
mov    $0x1,%eax
mov    $0x32,%ebp
lea    0xed6(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %eax,%r15d
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    %r15d,%ebx
mov    %ebx,%eax
mov    %r15d,%ebx
add    $0xffffffff,%ebp
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %7, %1 ]
%3 = phi i32 [ 1, %0 ], [ %6, %1 ]
%4 = phi i32 [ 0, %0 ], [ %3, %1 ]
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = add nsw i32 %3, %4
%7 = add nuw nsw i32 %2, 1
%8 = icmp eq i32 %7, 51
br i1 %8, label %9, label %1
9: ; preds = %1
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ u_char;
struct ip {
  scalar_t__ ip_p;
};

/* Variables and functions */
scalar_t__ IPPROTO_UDP;
int isUDP(const u_char *p, int source) {
  return ((struct ip *)(p + 14))->ip_p == IPPROTO_UDP;
}


x86 assembly (clang, -O0):
<isUDP>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x38(%rax),%rax
mov    0x2ebe(%rip),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isUDP>:
mov    0x38(%rdi),%rcx
mov    0x2ecd(%rip),%rdx
xor    %eax,%eax
cmp    (%rdx),%rcx
sete   %al
ret

LLVM IR (-O0):
%struct.ip = type { i64 }
@IPPROTO_UDP = global i64 0
define i32 @isUDP(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = getelementptr inbounds i32, i32* %5, i64 14
%7 = bitcast i32* %6 to %struct.ip*
%8 = getelementptr inbounds %struct.ip, %struct.ip* %7, i32 0, i32 0
%9 = load i64, i64* %8
%10 = load i64, i64* @IPPROTO_UDP
%11 = icmp eq i64 %9, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@IPPROTO_UDP = global i64 0
define i32 @isUDP(i32* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 14
%4 = bitcast i32* %3 to i64*
%5 = load i64, i64* %4
%6 = load i64, i64* @IPPROTO_UDP
%7 = icmp eq i64 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
int isodigit(int c) { return '0' <= c && c <= '7'; }


x86 assembly (clang, -O0):
<isodigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x30,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jg     1124 <isodigit+0x24>
cmpl   $0x37,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isodigit>:
and    $0xfffffff8,%edi
xor    %eax,%eax
cmp    $0x30,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isodigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 48, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 55
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @isodigit(i32 %0) {
%2 = and i32 %0, -8
%3 = icmp eq i32 %2, 48
%4 = zext i1 %3 to i32
ret i32 %4
}
int trace(void (*proc)(), char *name, char *arg_format, int retsize) {
  return -1;
}


x86 assembly (clang, -O0):
<trace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @trace(void (...)* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca void (...)*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store void (...)* %0, void (...)** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
ret i32 -1
}

LLVM IR (-O2):
define i32 @trace(void (...)* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
ret i32 -1
}
cmp(const void *a, const void *b) { return *(int *)a - *(int *)b; }


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
define i32 @cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int CellNextForDead(int neighborNum) { return (neighborNum == 3); }


x86 assembly (clang, -O0):
<CellNextForDead>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CellNextForDead>:
xor    %eax,%eax
cmp    $0x3,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @CellNextForDead(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 3
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @CellNextForDead(i32 %0) {
%2 = icmp eq i32 %0, 3
%3 = zext i1 %2 to i32
ret i32 %3
}
char *Tcl_Realloc(ptr, size)
char *ptr;
unsigned int size;
{
  char *result;
  result = TclpRealloc(ptr, size);
  if (result == 0)
    panic("unable to realloc %d bytes", size);
  return result;
}


x86 assembly (clang, -O0):
<Tcl_Realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1040 <TclpRealloc@plt>
cltq
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115f <Tcl_Realloc+0x3f>
mov    -0xc(%rbp),%esi
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <panic@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Tcl_Realloc>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
xor    %eax,%eax
call   1040 <TclpRealloc@plt>
mov    %eax,%ebp
test   %eax,%eax
jne    1142 <Tcl_Realloc+0x22>
lea    0xec7(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1030 <panic@plt>
movslq %ebp,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [27 x i8] c"unable to realloc %d bytes\00"
define i8* @Tcl_Realloc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @TclpRealloc to i32 (i8*, i32, ...)*)(i8* %6, i32 %7)
%9 = sext i32 %8 to i64
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %5
%11 = load i8*, i8** %5
%12 = icmp eq i8* %11, null
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = load i32, i32* %4
%15 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @panic to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %14)
br label %16
16: ; preds = %13, %2
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
@.str = [27 x i8] c"unable to realloc %d bytes\00"
define i8* @Tcl_Realloc(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @TclpRealloc to i32 (i8*, i32, ...)*)(i8* %0, i32 %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @panic to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %7
7: ; preds = %5, %2
%8 = sext i32 %3 to i64
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}
void set_undo(void) {
  register int i;
  for (i = (10 - 1); i > 0; --i)
    ;
}


x86 assembly (clang, -O0):
<set_undo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x9,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1128 <set_undo+0x28>
jmp    111a <set_undo+0x1a>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <set_undo+0xb>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @set_undo() {
%1 = alloca i32
store i32 9, i32* %1
br label %2
2: ; preds = %6, %0
%3 = load i32, i32* %1
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
br label %6
6: ; preds = %5
%7 = load i32, i32* %1
%8 = add nsw i32 %7, -1
store i32 %8, i32* %1
br label %2
9: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @set_undo() {
ret void
}
/* Variables and functions */
scalar_t__ isxdigit(int);
int utlisxdigit(int ch) { return (ch <= 0xFF) && isxdigit(ch); }


x86 assembly (clang, -O0):
<utlisxdigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0xff,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jg     113f <utlisxdigit+0x2f>
mov    -0x4(%rbp),%edi
call   1030 <isxdigit@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utlisxdigit>:
xor    %eax,%eax
cmp    $0xff,%edi
jg     112f <utlisxdigit+0x1f>
push   %rax
call   1030 <isxdigit@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @utlisxdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 255
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i64 @isxdigit(i32 %6)
%8 = icmp ne i64 %7, 0
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ false, %1 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @utlisxdigit(i32 %0) {
%2 = icmp slt i32 %0, 256
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i64 @isxdigit(i32 %0)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
double floor(double);
double rint(double x) { return ((x < 0.) ? -floor(-x + .5) : floor(x + .5)); }


x86 assembly (clang, -O0):
<rint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1179 <rint+0x69>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xeb1(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <floor@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1190 <rint+0x80>
movsd  0xe7f(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rint>:
push   %rax
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    113a <rint+0x2a>
movsd  0xedd(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
call   1030 <floor@plt>
xorpd  0xed8(%rip),%xmm0
pop    %rax
ret
addsd  0xebe(%rip),%xmm0
pop    %rax
jmp    1030 <floor@plt>

LLVM IR (-O0):
define double @rint(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load double, double* %2
%7 = fneg double %6
%8 = fadd double %7, 5.000000e-01
%9 = call double @llvm.floor.f64(double %8)
%10 = fneg double %9
br label %15
11: ; preds = %1
%12 = load double, double* %2
%13 = fadd double %12, 5.000000e-01
%14 = call double @llvm.floor.f64(double %13)
br label %15
15: ; preds = %11, %5
%16 = phi double [ %10, %5 ], [ %14, %11 ]
ret double %16
}

LLVM IR (-O2):
define double @rint(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = fsub double 5.000000e-01, %0
%5 = tail call double @llvm.floor.f64(double %4)
%6 = fneg double %5
br label %10
7: ; preds = %1
%8 = fadd double %0, 5.000000e-01
%9 = tail call double @llvm.floor.f64(double %8)
br label %10
10: ; preds = %7, %3
%11 = phi double [ %6, %3 ], [ %9, %7 ]
ret double %11
}
__attribute__((visibility("default"))) void FBRead(unsigned int addr) {}


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

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

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

LLVM IR (-O2):
define void @FBRead(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: cmp [-l | -s] file1 file2 [skip1 [skip2]]\n");
  exit(2);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [50 x i8] c"usage: cmp [-l | -s] file1 file2 [skip1 [skip2]]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [50 x i8] c"usage: cmp [-l | -s] file1 file2 [skip1 [skip2]]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}
int test_imm_A6int16_reg(short val) {
  return ((val) & (0xA6 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_A6int16_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, 166
%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_A6int16_reg(i16 signext %0) {
%2 = and i16 %0, 166
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
float fmaf(float const, float const, float const);
float lerpf(float const a, float const b, float const t) {
  return fmaf(t, b, fmaf(-t, a, a));
}


x86 assembly (clang, -O0):
<lerpf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x4(%rbp),%xmm1
movss  -0x4(%rbp),%xmm2
call   1030 <fmaf@plt>
movss  -0x14(%rbp),%xmm1
movaps %xmm0,%xmm2
movss  -0x10(%rbp),%xmm0
call   1030 <fmaf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lerpf>:
sub    $0x28,%rsp
movaps %xmm2,0x10(%rsp)
movss  %xmm1,0xc(%rsp)
movaps %xmm0,%xmm1
movaps 0xed7(%rip),%xmm0
xorps  %xmm2,%xmm0
movaps %xmm1,%xmm2
call   1030 <fmaf@plt>
movaps %xmm0,%xmm2
movaps 0x10(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
add    $0x28,%rsp
jmp    1030 <fmaf@plt>

LLVM IR (-O0):
define float @lerpf(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load float, float* %5
%9 = load float, float* %6
%10 = fneg float %9
%11 = load float, float* %4
%12 = load float, float* %4
%13 = call float @llvm.fma.f32(float %10, float %11, float %12)
%14 = call float @llvm.fma.f32(float %7, float %8, float %13)
ret float %14
}

LLVM IR (-O2):
define float @lerpf(float %0, float %1, float %2) {
%4 = fneg float %2
%5 = tail call float @llvm.fma.f32(float %4, float %0, float %0)
%6 = tail call float @llvm.fma.f32(float %2, float %1, float %5)
ret float %6
}