xunge/DecIR huggingface dataset:
/* Type definitions */
struct vec2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vec2_add(float *, float *, float *);
__attribute__((always_)) struct vec2 *
psvec2_add(struct vec2 *result, struct vec2 *a, struct vec2 *b) {
  vec2_add((float *)result, (float *)a, (float *)b);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec2_add>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec2_add@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_add(%struct.vec2* %0, %struct.vec2* %1, %struct.vec2* %2) {
%4 = alloca %struct.vec2*
%5 = alloca %struct.vec2*
%6 = alloca %struct.vec2*
store %struct.vec2* %0, %struct.vec2** %4
store %struct.vec2* %1, %struct.vec2** %5
store %struct.vec2* %2, %struct.vec2** %6
%7 = load %struct.vec2*, %struct.vec2** %4
%8 = bitcast %struct.vec2* %7 to float*
%9 = load %struct.vec2*, %struct.vec2** %5
%10 = bitcast %struct.vec2* %9 to float*
%11 = load %struct.vec2*, %struct.vec2** %6
%12 = bitcast %struct.vec2* %11 to float*
%13 = call i32 @vec2_add(float* %8, float* %10, float* %12)
%14 = load %struct.vec2*, %struct.vec2** %4
ret %struct.vec2* %14
}

LLVM IR (-O2):
%struct.vec2 = type { i32 }
define %struct.vec2* @psvec2_add(%struct.vec2* returned %0, %struct.vec2* %1, %struct.vec2* %2) {
%4 = bitcast %struct.vec2* %0 to float*
%5 = bitcast %struct.vec2* %1 to float*
%6 = bitcast %struct.vec2* %2 to float*
%7 = tail call i32 @vec2_add(float* %4, float* %5, float* %6)
ret %struct.vec2* %0
}
void XauFileName() {}


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

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

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

LLVM IR (-O2):
define void @XauFileName() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ quickSortHelper(double *, double *, int /*<<< orphan*/,
                                   double);
void quickSort(double numerator[], double denominator[], double length) {
  quickSortHelper(numerator, denominator, 0, length - 1);
}


x86 assembly (clang, -O0):
<quickSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsd  -0x18(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
subsd  %xmm1,%xmm0
xor    %edx,%edx
call   1030 <quickSortHelper@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quickSort>:
addsd  0xee8(%rip),%xmm0
xor    %edx,%edx
jmp    1030 <quickSortHelper@plt>

LLVM IR (-O0):
define void @quickSort(double* %0, double* %1, double %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double
store double* %0, double** %4
store double* %1, double** %5
store double %2, double* %6
%7 = load double*, double** %4
%8 = load double*, double** %5
%9 = load double, double* %6
%10 = fsub double %9, 1.000000e+00
%11 = call i32 @quickSortHelper(double* %7, double* %8, i32 0, double %10)
ret void
}

LLVM IR (-O2):
define void @quickSort(double* %0, double* %1, double %2) {
%4 = fadd double %2, -1.000000e+00
%5 = tail call i32 @quickSortHelper(double* %0, double* %1, i32 0, double %4)
ret void
}
/* Variables and functions */
int munmap(void *addr, size_t len) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @munmap(i8* nocapture readnone %0, i64 %1) {
ret i32 0
}
/* Type definitions */
struct msqid_ds {
  scalar_t__ msg_qnum;
};

/* Variables and functions */
int /*<<< orphan*/ IPC_STAT;
int /*<<< orphan*/ assert(int);
int msgctl(int, int /*<<< orphan*/, struct msqid_ds *);
unsigned long int mg_length(int qid) {
  struct msqid_ds buf;
  assert(msgctl(qid, IPC_STAT, &buf) > -1);
  return (unsigned long int)buf.msg_qnum;
}


x86 assembly (clang, -O0):
<mg_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
lea    -0x10(%rbp),%rdx
call   1040 <msgctl@plt>
cmp    $0xffffffff,%eax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mg_length>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdx
call   1040 <msgctl@plt>
not    %eax
shr    $0x1f,%eax
mov    %eax,%edi
call   1030 <assert@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.msqid_ds = type { i64 }
@IPC_STAT = global i32 0
define i64 @mg_length(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.msqid_ds
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @IPC_STAT
%6 = call i32 @msgctl(i32 %4, i32 %5, %struct.msqid_ds* %3)
%7 = icmp sgt i32 %6, -1
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = getelementptr inbounds %struct.msqid_ds, %struct.msqid_ds* %3, i32 0, i32 0
%11 = load i64, i64* %10
ret i64 %11
}

LLVM IR (-O2):
%struct.msqid_ds = type { i64 }
@IPC_STAT = global i32 0
define i64 @mg_length(i32 %0) {
%2 = alloca %struct.msqid_ds
%3 = bitcast %struct.msqid_ds* %2 to i8*
%4 = load i32, i32* @IPC_STAT
%5 = call i32 @msgctl(i32 %0, i32 %4, %struct.msqid_ds* %2)
%6 = xor i32 %5, -1
%7 = lshr i32 %6, 31
%8 = call i32 @assert(i32 %7)
%9 = getelementptr inbounds %struct.msqid_ds, %struct.msqid_ds* %2, i64 0, i32 0
%10 = load i64, i64* %9
ret i64 %10
}
void g_unichar_to_utf8() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @pdc_dummy_digsig_c() {
ret void
}
int islower(int c) { return c >= 'a' && c <= 'z'; }


x86 assembly (clang, -O0):
<islower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <islower+0x20>
cmpl   $0x7a,-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):
<islower>:
add    $0xffffff9f,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @islower(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
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 @islower(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
txt_smpte(hr, mn, se, fr, ff) {
  prtime();
  printf("SMPTE, hour=%d minute=%d second=%d frame=%d fract-frame=%d\n", hr, mn,
         se, fr, ff);
}


x86 assembly (clang, -O0):
<txt_smpte>:
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    %r8d,-0x18(%rbp)
mov    $0x0,%al
call   1040 <prtime@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<txt_smpte>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <prtime@plt>
lea    0xebd(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    %r14d,%r9d
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"SMPTE, hour=%d minute=%d second=%d frame=%d fract-frame=%d\0A\00"
define i32 @txt_smpte(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i32 %4, i32* %11
%12 = call i32 (...) @prtime()
%13 = load i32, i32* %7
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = load i32, i32* %10
%17 = load i32, i32* %11
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i32 %15, i32 %16, i32 %17)
%19 = load i32, i32* %6
ret i32 %19
}

LLVM IR (-O2):
@.str = [60 x i8] c"SMPTE, hour=%d minute=%d second=%d frame=%d fract-frame=%d\0A\00"
define i32 @txt_smpte(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 (...) @prtime()
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3, i32 %4)
ret i32 undef
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int does_attack(int, int);
int offset(int /*<<< orphan*/, int, int, int);
int autohelperowl_attackpat141(struct pattern *patt, int transformation,
                               int move, int color, int action) {
  int A;
  (void)patt;
  (void)color;
  (void)action;
  A = offset(0, -1, move, transformation);
  return does_attack(move, A);
}


x86 assembly (clang, -O0):
<autohelperowl_attackpat141>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1030 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1040 <does_attack@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_attackpat141>:
push   %rbx
mov    %edx,%ebx
mov    %esi,%ecx
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1030 <offset@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <does_attack@plt>

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat141(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 0, i32 -1, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %8
%19 = load i32, i32* %11
%20 = call i32 @does_attack(i32 %18, i32 %19)
ret i32 %20
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat141(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 0, i32 -1, i32 %2, i32 %1)
%7 = tail call i32 @does_attack(i32 %2, i32 %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ calledFun();
void test_mul_and_zero(int x) {
  if (x & 0)
    calledFun();
  if (0 & x)
    calledFun();
  if (x * 0)
    calledFun();
  if (0 * x)
    calledFun();
}


x86 assembly (clang, -O0):
<test_mul_and_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x0,%eax
cmp    $0x0,%eax
je     1131 <test_mul_and_zero+0x21>
mov    $0x0,%al
call   1030 <calledFun@plt>
mov    -0x4(%rbp),%eax
and    $0x0,%eax
cmp    $0x0,%eax
je     1147 <test_mul_and_zero+0x37>
mov    $0x0,%al
call   1030 <calledFun@plt>
imul   $0x0,-0x4(%rbp),%eax
cmp    $0x0,%eax
je     115b <test_mul_and_zero+0x4b>
mov    $0x0,%al
call   1030 <calledFun@plt>
imul   $0x0,-0x4(%rbp),%eax
cmp    $0x0,%eax
je     116f <test_mul_and_zero+0x5f>
mov    $0x0,%al
call   1030 <calledFun@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_mul_and_zero(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 0
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @calledFun()
br label %8
8: ; preds = %6, %1
%9 = load i32, i32* %2
%10 = and i32 0, %9
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 (...) @calledFun()
br label %14
14: ; preds = %12, %8
%15 = load i32, i32* %2
%16 = mul nsw i32 %15, 0
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = call i32 (...) @calledFun()
br label %20
20: ; preds = %18, %14
%21 = load i32, i32* %2
%22 = mul nsw i32 0, %21
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %20
%25 = call i32 (...) @calledFun()
br label %26
26: ; preds = %24, %20
ret void
}

LLVM IR (-O2):
define void @test_mul_and_zero(i32 %0) {
ret void
}
/* Type definitions */
struct TreeNode {
  int dummy;
};

/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ rightView(struct TreeNode *, int /*<<< orphan*/, int **,
                             int *);
int *rightSideView(struct TreeNode *root, int *returnSize) {
  int *arr = (int *)malloc(sizeof(int));
  *returnSize = 0;
  rightView(root, 0, &arr, returnSize);
  return arr;
}


x86 assembly (clang, -O0):
<rightSideView>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
xor    %esi,%esi
lea    -0x18(%rbp),%rdx
call   1040 <rightView@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rightSideView>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,(%rsp)
movl   $0x0,(%rbx)
mov    %rsp,%rdx
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rcx
call   1040 <rightView@plt>
mov    (%rsp),%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.TreeNode = type { i32 }
define i32* @rightSideView(%struct.TreeNode* %0, i32* %1) {
%3 = alloca %struct.TreeNode*
%4 = alloca i32*
%5 = alloca i32*
store %struct.TreeNode* %0, %struct.TreeNode** %3
store i32* %1, i32** %4
%6 = call i64 @malloc(i32 4)
%7 = inttoptr i64 %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %4
store i32 0, i32* %8
%9 = load %struct.TreeNode*, %struct.TreeNode** %3
%10 = load i32*, i32** %4
%11 = call i32 @rightView(%struct.TreeNode* %9, i32 0, i32** %5, i32* %10)
%12 = load i32*, i32** %5
ret i32* %12
}

LLVM IR (-O2):
%struct.TreeNode = type { i32 }
define i32* @rightSideView(%struct.TreeNode* %0, i32* %1) {
%3 = alloca i32*
%4 = bitcast i32** %3 to i8*
%5 = tail call i64 @malloc(i32 4)
%6 = inttoptr i64 %5 to i32*
store i32* %6, i32** %3
store i32 0, i32* %1
%7 = call i32 @rightView(%struct.TreeNode* %0, i32 0, i32** %3, i32* %1)
%8 = load i32*, i32** %3
ret i32* %8
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned int *, unsigned char const *, int);
unsigned int get_unaligned_uint(const unsigned char *cursor) {
  unsigned int result;
  memcpy(&result, cursor, sizeof(unsigned int));
  return result;
}


x86 assembly (clang, -O0):
<get_unaligned_uint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_unaligned_uint>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
mov    $0x4,%edx
call   1030 <memcpy@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @get_unaligned_uint(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i32* %2, i8* %0, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
void test4(char *P, char *Q) { __builtin___memcpy_chk(P, Q, 128, 128); }


x86 assembly (clang, -O0):
<test4>:
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    $0x80,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4>:
movups 0x70(%rsi),%xmm0
movups %xmm0,0x70(%rdi)
movups 0x60(%rsi),%xmm0
movups %xmm0,0x60(%rdi)
movups 0x50(%rsi),%xmm0
movups %xmm0,0x50(%rdi)
movups 0x40(%rsi),%xmm0
movups %xmm0,0x40(%rdi)
movups (%rsi),%xmm0
movups 0x10(%rsi),%xmm1
movups 0x20(%rsi),%xmm2
movups 0x30(%rsi),%xmm3
movups %xmm3,0x30(%rdi)
movups %xmm2,0x20(%rdi)
movups %xmm1,0x10(%rdi)
movups %xmm0,(%rdi)
ret

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

LLVM IR (-O2):
define void @test4(i8* nocapture writeonly %0, i8* nocapture %1) {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(128) %0, i8* align 1 dereferenceable(128) %1, i64 128, i1 false)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int _mm_cvttss_si32(int /*<<< orphan*/);
int __attribute__((__always___, __nodebug__)) _mm_cvtt_ss2si(__m128 a) {
  return _mm_cvttss_si32(a);
}


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

x86 assembly (clang, -O2):
<_mm_cvtt_ss2si>:
jmp    1030 <_mm_cvttss_si32@plt>

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

LLVM IR (-O2):
define i32 @_mm_cvtt_ss2si(i32 %0) {
%2 = tail call i32 @_mm_cvttss_si32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
__attribute__((no)) detect_noreturn() { exit(0); }


x86 assembly (clang, -O0):
<detect_noreturn>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<detect_noreturn>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @detect_noreturn() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @detect_noreturn() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
bool valid_unquoted_char(char ch) {
  return (unsigned char)ch > 0x20 && ch != '"' && ch != '\'';
}


x86 assembly (clang, -O0):
<valid_unquoted_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
jle    113b <valid_unquoted_char+0x3b>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x22,%ecx
mov    %al,-0x2(%rbp)
je     113b <valid_unquoted_char+0x3b>
movsbl -0x1(%rbp),%eax
cmp    $0x27,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_unquoted_char>:
cmp    $0x21,%dil
setae  %al
cmp    $0x22,%dil
setne  %cl
and    %al,%cl
cmp    $0x27,%dil
setne  %al
and    %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @valid_unquoted_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sgt i32 %4, 32
br i1 %5, label %6, label %14
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 34
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 39
br label %14
14: ; preds = %10, %6, %1
%15 = phi i1 [ false, %6 ], [ false, %1 ], [ %13, %10 ]
%16 = zext i1 %15 to i32
ret i32 %16
}

LLVM IR (-O2):
define i32 @valid_unquoted_char(i8 signext %0) {
%2 = icmp ugt i8 %0, 32
%3 = icmp ne i8 %0, 34
%4 = and i1 %2, %3
%5 = icmp ne i8 %0, 39
%6 = and i1 %5, %4
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
scalar_t__ is_prime(int *);
int *next_prime(int *start) {
  int i = (*start + 1);
  int *prime_ptr;
  do {
    if (is_prime(&i)) {
      prime_ptr = &i;
      return prime_ptr;
    }
    i++;
  } while (i >= 1);
}


x86 assembly (clang, -O0):
<next_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <is_prime@plt>
cmp    $0x0,%rax
je     1150 <next_prime+0x40>
lea    -0x14(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1163 <next_prime+0x53>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jge    1128 <next_prime+0x18>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_prime>:
push   %rbx
sub    $0x10,%rsp
mov    (%rdi),%eax
add    $0x1,%eax
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
call   1030 <is_prime@plt>
test   %rax,%rax
jne    114c <next_prime+0x3c>
mov    0xc(%rsp),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0xc(%rsp)
test   %eax,%eax
jns    1130 <next_prime+0x20>
lea    0xc(%rsp),%rax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32* @next_prime(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* %0
%5 = add nsw i32 %4, 1
store i32 %5, i32* %2
br label %6
6: ; preds = %9, %1
%7 = call i64 @is_prime(i32* %2)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %2
%11 = add nsw i32 %10, 1
store i32 %11, i32* %2
%12 = icmp sgt i32 %10, -1
br i1 %12, label %6, label %13
13: ; preds = %9, %6
ret i32* %2
}
void delay(int a, int b, int c, int d, int e, int f, int g, int h) {
  volatile int i = a + b + c + d + e + f + g + h;
  while (i--)
    ;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
add    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
add    0x10(%rbp),%eax
add    0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x1c(%rbp)
cmp    $0x0,%eax
je     1152 <delay+0x52>
jmp    1139 <delay+0x39>
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
add    %esi,%edi
add    %edx,%edi
add    %ecx,%edi
add    %r8d,%edi
add    %r9d,%edi
add    0x8(%rsp),%edi
add    0x10(%rsp),%edi
mov    %edi,-0x4(%rsp)
nopl   0x0(%rax,%rax,1)
subl   $0x1,-0x4(%rsp)
jae    1120 <delay+0x20>
ret

LLVM IR (-O0):
define void @delay(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store i32 %0, i32* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%18 = load i32, i32* %9
%19 = load i32, i32* %10
%20 = add nsw i32 %18, %19
%21 = load i32, i32* %11
%22 = add nsw i32 %20, %21
%23 = load i32, i32* %12
%24 = add nsw i32 %22, %23
%25 = load i32, i32* %13
%26 = add nsw i32 %24, %25
%27 = load i32, i32* %14
%28 = add nsw i32 %26, %27
%29 = load i32, i32* %15
%30 = add nsw i32 %28, %29
%31 = load i32, i32* %16
%32 = add nsw i32 %30, %31
store volatile i32 %32, i32* %17
br label %33
33: ; preds = %37, %8
%34 = load volatile i32, i32* %17
%35 = add nsw i32 %34, -1
store volatile i32 %35, i32* %17
%36 = icmp ne i32 %34, 0
br i1 %36, label %37, label %38
37: ; preds = %33
br label %33
38: ; preds = %33
ret void
}

LLVM IR (-O2):
define void @delay(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i32
%10 = bitcast i32* %9 to i8*
%11 = add nsw i32 %1, %0
%12 = add nsw i32 %11, %2
%13 = add nsw i32 %12, %3
%14 = add nsw i32 %13, %4
%15 = add nsw i32 %14, %5
%16 = add nsw i32 %15, %6
%17 = add nsw i32 %16, %7
store volatile i32 %17, i32* %9
br label %18
18: ; preds = %18, %8
%19 = load volatile i32, i32* %9
%20 = add nsw i32 %19, -1
store volatile i32 %20, i32* %9
%21 = icmp eq i32 %19, 0
br i1 %21, label %22, label %18
22: ; preds = %18
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ little_endian_read_16(int /*<<< orphan*/ const *, int);
uint16_t rfcomm_event_incoming_connection_get_rfcomm_cid(const uint8_t *event) {
  return little_endian_read_16(event, 9);
}


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

x86 assembly (clang, -O2):
<rfcomm_event_incoming_connection_get_rfcomm_cid>:
mov    $0x9,%esi
jmp    1030 <little_endian_read_16@plt>

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

LLVM IR (-O2):
define i32 @rfcomm_event_incoming_connection_get_rfcomm_cid(i32* %0) {
%2 = tail call i32 @little_endian_read_16(i32* %0, i32 9)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void handle_conn_active(void *context) { printf("handle_conn_active\n"); }


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

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

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

LLVM IR (-O2):
@str = [19 x i8] c"handle_conn_active\00"
define void @handle_conn_active(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
double cur_time(void) {
  struct timeval tv;
  struct timezone tz;
  gettimeofday(&tv, &tz);
  return tv.tv_sec + tv.tv_usec * 1.0e-6;
}


x86 assembly (clang, -O0):
<cur_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0xec9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cur_time>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <gettimeofday@plt>
movsd  0x10(%rsp),%xmm0
mulsd  0xed1(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
%struct.timezone = type { i32 }
define double @cur_time() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timezone
%3 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %2)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load double, double* %6
%8 = call double @llvm.fmuladd.f64(double %7, double 0x3EB0C6F7A0B5ED8D, double %5)
ret double %8
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
%struct.timezone = type { i32 }
define double @cur_time() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timezone
%3 = bitcast %struct.timeval* %1 to i8*
%4 = bitcast %struct.timezone* %2 to i8*
%5 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %2)
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load double, double* %6
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load double, double* %8
%10 = tail call double @llvm.fmuladd.f64(double %9, double 0x3EB0C6F7A0B5ED8D, double %7)
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void free_ivector(int *v, int nl, int nh) { free((int *)(v + nl)); }


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

x86 assembly (clang, -O2):
<free_ivector>:
movslq %esi,%rax
lea    (%rdi,%rax,4),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_ivector(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %7, i64 %9
%11 = call i32 @free(i32* %10)
ret void
}

LLVM IR (-O2):
define void @free_ivector(i32* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = tail call i32 @free(i32* %5)
ret void
}
/* Variables and functions */
int IndexOf_internal(char *, char *, char const, char const);
int IndexOfExceptWithin(char *input, char *target, const char openSymbolWithin,
                        const char closeSymbolWithin) {
  return IndexOf_internal(input, target, openSymbolWithin, closeSymbolWithin);
}


x86 assembly (clang, -O0):
<IndexOfExceptWithin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cl,-0x11(%rbp)
mov    %al,-0x12(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x11(%rbp),%al
movsbl %al,%edx
movsbl -0x12(%rbp),%ecx
call   1030 <IndexOf_internal@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IndexOfExceptWithin>:
jmp    1030 <IndexOf_internal@plt>

LLVM IR (-O0):
define i32 @IndexOfExceptWithin(i8* %0, i8* %1, i8 signext %2, i8 signext %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8, i8* %7
%12 = load i8, i8* %8
%13 = call i32 @IndexOf_internal(i8* %9, i8* %10, i8 signext %11, i8 signext %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @IndexOfExceptWithin(i8* %0, i8* %1, i8 signext %2, i8 signext %3) {
%5 = tail call i32 @IndexOf_internal(i8* %0, i8* %1, i8 signext %2, i8 signext %3)
ret i32 %5
}
int mul(int x, int y) {
  int ret = 0;
  while (x--) {
    ret += y;
  }
  return ret;
}


x86 assembly (clang, -O0):
<mul>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
je     1133 <mul+0x33>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1111 <mul+0x11>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @mul(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 = %10, %2
%7 = load i32, i32* %3
%8 = add nsw i32 %7, -1
store i32 %8, i32* %3
%9 = icmp ne i32 %7, 0
br i1 %9, label %10, label %14
10: ; preds = %6
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = add nsw i32 %12, %11
store i32 %13, i32* %5
br label %6
14: ; preds = %6
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @mul(i32 %0, i32 %1) {
%3 = mul i32 %1, %0
ret i32 %3
}
unsigned int ivaluation(int a) {
  unsigned int uit = 0;
  while (!(a % 3)) {
    a = a / 3;
    uit++;
  }
  return (uit);
}


x86 assembly (clang, -O0):
<ivaluation>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    112e <ivaluation+0x2e>
jmp    114a <ivaluation+0x4a>
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <ivaluation+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivaluation>:
imul   $0xaaaaaaab,%edi,%ecx
add    $0x2aaaaaaa,%ecx
xor    %eax,%eax
cmp    $0x55555554,%ecx
ja     114e <ivaluation+0x4e>
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x55555556,%rcx,%rdi
mov    %rdi,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rdi
add    %ecx,%edi
add    $0x1,%eax
imul   $0xaaaaaaab,%edi,%ecx
add    $0x2aaaaaaa,%ecx
cmp    $0x55555555,%ecx
jb     1120 <ivaluation+0x20>
ret

LLVM IR (-O0):
define i32 @ivaluation(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %9, %1
%5 = load i32, i32* %2
%6 = srem i32 %5, 3
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
br i1 %8, label %9, label %14
9: ; preds = %4
%10 = load i32, i32* %2
%11 = sdiv i32 %10, 3
store i32 %11, i32* %2
%12 = load i32, i32* %3
%13 = add i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
define i32 @ivaluation(i32 %0) {
%2 = srem i32 %0, 3
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %11
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i32 [ %7, %4 ], [ %0, %1 ]
%7 = sdiv i32 %6, 3
%8 = add i32 %5, 1
%9 = srem i32 %7, 3
%10 = icmp eq i32 %9, 0
br i1 %10, label %4, label %11
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
void multi_n() {
  register int out0 = 0;
  asm("foo %1,%0" : "=r,r"(out0) : "r,n"(1));
}


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

LLVM IR (-O0):
LLVM IR (-O2):
define void @multi_n() {
%1 = tail call i32 asm "foo $1,$0", "=r|r,r|n,~{dirflag},~{fpsr},~{flags}"(i32 1)
ret void
}
double caccess_read_pointer_double(double *address) { return *address; }


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

x86 assembly (clang, -O2):
<caccess_read_pointer_double>:
movsd  (%rdi),%xmm0
ret

LLVM IR (-O0):
define double @caccess_read_pointer_double(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = load double, double* %3
ret double %4
}

LLVM IR (-O2):
define double @caccess_read_pointer_double(double* nocapture %0) {
%2 = load double, double* %0
ret double %2
}
void f188(void) {
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
a:
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  0;
  goto a;
}


x86 assembly (clang, -O0):
<f188>:
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    1119 <f188+0x19>

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

LLVM IR (-O0):
define void @f188() {
%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
br label %10
10: ; preds = %10, %0
store i32 0, i32* %4
%11 = load i32, i32* %4
store i32 0, i32* %5
%12 = load i32, i32* %5
store i32 0, i32* %6
%13 = load i32, i32* %6
br label %10
}

LLVM IR (-O2):
define void @f188() {
br label %1
1: ; preds = %1, %0
br label %1
}
void *vmaxget(void) { return 0; }


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

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

LLVM IR (-O0):
define i8* @vmaxget() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @vmaxget() {
ret i8* null
}
float Sleef_atan2f_u10(float x, float y) { return __builtin_atan2f(x, y); }


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

x86 assembly (clang, -O2):
<Sleef_atan2f_u10>:
jmp    1030 <atan2f@plt>

LLVM IR (-O0):
define float @Sleef_atan2f_u10(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 = load float, float* %4
%7 = call float @atan2f(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @Sleef_atan2f_u10(float %0, float %1) {
%3 = tail call float @atan2f(float %0, float %1)
ret float %3
}
/* Variables and functions */
int fabs(float);
float sqrt2(float a) {
  float x0, x1;
  x0 = 1.0;
  do {
    x1 = a / (2 * x0) + x0 / 2;
    if (fabs(x0 - x1) < 10e-3)
      break;
    x0 = x1;
  } while (1);
  return x0;
}


x86 assembly (clang, -O0):
<sqrt2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xecd(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
movss  0xeb7(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0xc(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe93(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    1184 <sqrt2+0x74>
jmp    119d <sqrt2+0x8d>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    112a <sqrt2+0x1a>
jmp    119d <sqrt2+0x8d>
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrt2>:
sub    $0x18,%rsp
movss  %xmm0,0x10(%rsp)
movss  0xede(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movaps %xmm2,%xmm3
movaps %xmm2,%xmm0
addss  %xmm2,%xmm0
movss  0x10(%rsp),%xmm1
divss  %xmm0,%xmm1
mulss  0xeb8(%rip),%xmm2
addss  %xmm1,%xmm2
movss  %xmm2,0x14(%rsp)
movss  %xmm3,0xc(%rsp)
movaps %xmm3,%xmm0
subss  %xmm2,%xmm0
call   1030 <fabs@plt>
movss  0x14(%rsp),%xmm2
test   %eax,%eax
jg     1130 <sqrt2+0x20>
movss  0xc(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @sqrt2(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca float
store float %0, float* %2
store float 1.000000e+00, float* %3
br label %5
5: ; preds = %22, %1
%6 = load float, float* %2
%7 = load float, float* %3
%8 = fmul float 2.000000e+00, %7
%9 = fdiv float %6, %8
%10 = load float, float* %3
%11 = fdiv float %10, 2.000000e+00
%12 = fadd float %9, %11
store float %12, float* %4
%13 = load float, float* %3
%14 = load float, float* %4
%15 = fsub float %13, %14
%16 = call i32 @fabs(float %15)
%17 = sitofp i32 %16 to double
%18 = fcmp olt double %17, 1.000000e-02
br i1 %18, label %19, label %20
19: ; preds = %5
br label %23
20: ; preds = %5
%21 = load float, float* %4
store float %21, float* %3
br label %22
22: ; preds = %20
br i1 true, label %5, label %23
23: ; preds = %22, %19
%24 = load float, float* %3
ret float %24
}

LLVM IR (-O2):
define float @sqrt2(float %0) {
br label %2
2: ; preds = %2, %1
%3 = phi float [ 1.000000e+00, %1 ], [ %7, %2 ]
%4 = fmul float %3, 2.000000e+00
%5 = fdiv float %0, %4
%6 = fmul float %3, 5.000000e-01
%7 = fadd float %6, %5
%8 = fsub float %3, %7
%9 = tail call i32 @fabs(float %8)
%10 = icmp slt i32 %9, 1
br i1 %10, label %11, label %2
11: ; preds = %2
ret float %3
}
/* Variables and functions */
double __ocml_sqrt_rtn_f64(double);
double __dsqrt_ru(double x) { return __ocml_sqrt_rtn_f64(x); }


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

x86 assembly (clang, -O2):
<__dsqrt_ru>:
jmp    1030 <__ocml_sqrt_rtn_f64@plt>

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

LLVM IR (-O2):
define double @__dsqrt_ru(double %0) {
%2 = tail call double @__ocml_sqrt_rtn_f64(double %0)
ret double %2
}
int ft_ispunct(int c) {
  return ((' ' < c && c < '0') || ('9' < c && c < 'A') ||
          ('Z' < c && c < 'a') || ('z' < c && c <= '~'));
}


x86 assembly (clang, -O0):
<ft_ispunct>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x20,%eax
cmp    -0x4(%rbp),%eax
jge    1124 <ft_ispunct+0x24>
mov    $0x1,%al
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1181 <ft_ispunct+0x81>
mov    $0x39,%eax
cmp    -0x4(%rbp),%eax
jge    1141 <ft_ispunct+0x41>
mov    $0x1,%al
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1181 <ft_ispunct+0x81>
mov    $0x5a,%eax
cmp    -0x4(%rbp),%eax
jge    115e <ft_ispunct+0x5e>
mov    $0x1,%al
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1181 <ft_ispunct+0x81>
xor    %eax,%eax
mov    $0x7a,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x6(%rbp)
jge    117b <ft_ispunct+0x7b>
cmpl   $0x7e,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_ispunct>:
movd   %edi,%xmm0
pshufd $0x0,%xmm0,%xmm0
paddd  0xeef(%rip),%xmm0
pxor   0xef7(%rip),%xmm0
movdqa 0xeff(%rip),%xmm1
pcmpgtd %xmm0,%xmm1
movmskps %xmm1,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
ret

LLVM IR (-O0):
define i32 @ft_ispunct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 32, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 48
br i1 %7, label %28, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp slt i32 57, %9
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp slt i32 %12, 65
br i1 %13, label %28, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp slt i32 90, %15
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp slt i32 %18, 97
br i1 %19, label %28, label %20
20: ; preds = %17, %14
%21 = load i32, i32* %2
%22 = icmp slt i32 122, %21
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp sle i32 %24, 126
br label %26
26: ; preds = %23, %20
%27 = phi i1 [ false, %20 ], [ %25, %23 ]
br label %28
28: ; preds = %26, %17, %11, %5
%29 = phi i1 [ true, %17 ], [ true, %11 ], [ true, %5 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @ft_ispunct(i32 %0) {
%2 = insertelement <4 x i32> poison, i32 %0, i64 0
%3 = shufflevector <4 x i32> %2, <4 x i32> poison, <4 x i32> zeroinitializer
%4 = add <4 x i32> %3, <i32 -123, i32 -91, i32 -33, i32 -58>
%5 = icmp ult <4 x i32> %4, <i32 4, i32 6, i32 15, i32 7>
%6 = bitcast <4 x i1> %5 to i4
%7 = icmp ne i4 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
void g_node_n_children() {}


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

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

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

LLVM IR (-O2):
define void @g_node_n_children() {
ret void
}
/* Type definitions */
struct _reent {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
ssize_t _read_r(struct _reent *reent, int fd, const void *data, size_t length) {
  return 0;
}


x86 assembly (clang, -O0):
<_read_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct._reent = type { i32 }
define i32 @_read_r(%struct._reent* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i64 %3) {
ret i32 0
}