xunge/DecIR huggingface dataset:
main(argc, argv) char **argv;
{
  while (argc > 1) {
    printf("%s:	", argv[1]);
    type(argv[1]);
    argc--;
    argv++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    117f <main+0x5f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    $0x0,%al
call   1030 <type@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    1136 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     1163 <main+0x43>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x8,%rbx
add    $0x1,%ebp
lea    0xec4(%rip),%r14
nopl   0x0(%rax)
mov    (%rbx),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    (%rbx),%rdi
xor    %eax,%eax
call   1030 <type@plt>
add    $0x8,%rbx
add    $0xffffffff,%ebp
cmp    $0x2,%ebp
ja     1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"%s:\09\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %14
4: ; preds = %2, %4
%5 = phi i8** [ %7, %4 ], [ %1, %2 ]
%6 = phi i32 [ %12, %4 ], [ %0, %2 ]
%7 = getelementptr inbounds i8*, i8** %5, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i8*, i8** %7
%11 = tail call i32 (i8*, ...) bitcast (i32 (...)* @type to i32 (i8*, ...)*)(i8* %10)
%12 = add nsw i32 %6, -1
%13 = icmp ugt i32 %6, 2
br i1 %13, label %4, label %14
14: ; preds = %4, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ban_faces();
int /*<<< orphan*/ index_vertices();
void clear_faces() {
  index_vertices();
  ban_faces();
}


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

x86 assembly (clang, -O2):
<clear_faces>:
push   %rax
xor    %eax,%eax
call   1040 <index_vertices@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ban_faces@plt>

LLVM IR (-O0):
define void @clear_faces() {
%1 = call i32 (...) @index_vertices()
%2 = call i32 (...) @ban_faces()
ret void
}

LLVM IR (-O2):
define void @clear_faces() {
%1 = tail call i32 (...) @index_vertices()
%2 = tail call i32 (...) @ban_faces()
ret void
}
void ff_hevc_put_hevc_qpel_h4_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_h4_10_sse4() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ *display;
};
typedef TYPE_1__ XClientMessageEvent;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void set_XClientMessageEvent_display(void *_p, void *_v) {
  ((XClientMessageEvent *)_p)->display = (Display *)_v;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32* }
define void @set_XClientMessageEvent_display(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i32*
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to %struct.TYPE_2__*
%9 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %8, i32 0, i32 0
store i32* %6, i32** %9
ret void
}

LLVM IR (-O2):
define void @set_XClientMessageEvent_display(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ retval;

/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned long *, char *, int);
unsigned long HTcopy(char *ul) {
  unsigned long retval;
  memcpy(&retval, ul, sizeof(retval));
  return retval;
}


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

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

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

LLVM IR (-O2):
define i64 @HTcopy(i8* %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
%4 = call i32 @memcpy(i64* %2, i8* %0, i32 8)
%5 = load i64, i64* %2
ret i64 %5
}
/* Variables and functions */
int bef_pop();
int /*<<< orphan*/ printf(char *, int);
int ins_pti() {
  printf("%d ", bef_pop());
  return 1;
}


x86 assembly (clang, -O0):
<ins_pti>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <bef_pop@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ins_pti>:
push   %rax
xor    %eax,%eax
call   1040 <bef_pop@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
define i32 @ins_pti() {
%1 = call i32 (...) @bef_pop()
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define i32 @ins_pti() {
%1 = tail call i32 (...) @bef_pop()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 1
}
double min3(double a, double b, double c) {
  double min;
  min = a;
  if (min > b)
    min = b;
  if (min > c)
    min = c;
  return min;
}


x86 assembly (clang, -O0):
<min3>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1137 <min3+0x37>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1151 <min3+0x51>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min3>:
minsd  %xmm0,%xmm1
minsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @min3(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%8 = load double, double* %4
store double %8, double* %7
%9 = load double, double* %7
%10 = load double, double* %5
%11 = fcmp ogt double %9, %10
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = load double, double* %5
store double %13, double* %7
br label %14
14: ; preds = %12, %3
%15 = load double, double* %7
%16 = load double, double* %6
%17 = fcmp ogt double %15, %16
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = load double, double* %6
store double %19, double* %7
br label %20
20: ; preds = %18, %14
%21 = load double, double* %7
ret double %21
}

LLVM IR (-O2):
define double @min3(double %0, double %1, double %2) {
%4 = fcmp ogt double %0, %1
%5 = select i1 %4, double %1, double %0
%6 = fcmp ogt double %5, %2
%7 = select i1 %6, double %2, double %5
ret double %7
}
void Cyc_SIG_ERR(int ignore) { return; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ add_status(struct battle_char *, int);
scalar_t__ get_random(int /*<<< orphan*/, int);
scalar_t__ mod6(struct battle_char *, struct battle_char *, int);
void regen(struct battle_char *origin, struct battle_char *target) {
  if (get_random(0, 100) < mod6(origin, target, 170))
    add_status(target, 7);
}


x86 assembly (clang, -O0):
<regen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0xaa,%edx
call   1040 <mod6@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
jge    1180 <regen+0x50>
mov    -0x10(%rbp),%rdi
mov    $0x7,%esi
call   1050 <add_status@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<regen>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %edi,%edi
mov    $0x64,%esi
call   1030 <get_random@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0xaa,%edx
call   1040 <mod6@plt>
cmp    %rax,%rbx
jge    1171 <regen+0x41>
mov    %r14,%rdi
mov    $0x7,%esi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <add_status@plt>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.battle_char = type { i32 }
define void @regen(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = alloca %struct.battle_char*
%4 = alloca %struct.battle_char*
store %struct.battle_char* %0, %struct.battle_char** %3
store %struct.battle_char* %1, %struct.battle_char** %4
%5 = call i64 @get_random(i32 0, i32 100)
%6 = load %struct.battle_char*, %struct.battle_char** %3
%7 = load %struct.battle_char*, %struct.battle_char** %4
%8 = call i64 @mod6(%struct.battle_char* %6, %struct.battle_char* %7, i32 170)
%9 = icmp slt i64 %5, %8
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load %struct.battle_char*, %struct.battle_char** %4
%12 = call i32 @add_status(%struct.battle_char* %11, i32 7)
br label %13
13: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
%struct.battle_char = type { i32 }
define void @regen(%struct.battle_char* %0, %struct.battle_char* %1) {
%3 = tail call i64 @get_random(i32 0, i32 100)
%4 = tail call i64 @mod6(%struct.battle_char* %0, %struct.battle_char* %1, i32 170)
%5 = icmp slt i64 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @add_status(%struct.battle_char* %1, i32 7)
br label %8
8: ; preds = %6, %2
ret void
}
void mysetfontdirection_X(double alpha) {}


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

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

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

LLVM IR (-O2):
define void @mysetfontdirection_X(double %0) {
ret void
}
int strLen(char str[]) {
  int len = 0;
  for (; str[len] != 0; len++)
    ;
  return len;
}


x86 assembly (clang, -O0):
<strLen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1137 <strLen+0x37>
jmp    1129 <strLen+0x29>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strLen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strLen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <strLen+0x10>
ret

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

LLVM IR (-O2):
define i32 @strLen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
void test_43_0(char *mem) { __atomic_nand_fetch(mem, -1, 4); }


x86 assembly (clang, -O0):
<test_43_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movb   $0xff,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    %cl,-0xc(%rbp)
mov    (%rax),%al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    -0xc(%rbp),%sil
mov    %al,%dl
and    %sil,%dl
mov    %dl,-0x1a(%rbp)
not    %dl
lock cmpxchg %dl,(%rcx)
sete   %cl
mov    %al,-0x19(%rbp)
test   $0x1,%cl
mov    %al,-0xb(%rbp)
jne    114f <test_43_0+0x4f>
jmp    111f <test_43_0+0x1f>
mov    -0xc(%rbp),%cl
mov    -0x19(%rbp),%al
and    %cl,%al
xor    $0xff,%al
mov    %al,-0xa(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_43_0>:
mov    (%rdi),%al
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
not    %cl
lock cmpxchg %cl,(%rdi)
jne    1110 <test_43_0+0x10>
ret

LLVM IR (-O0):
define void @test_43_0(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8 -1, i8* %3
%6 = load i8, i8* %3
%7 = atomicrmw nand i8* %5, i8 %6 acq_rel
%8 = and i8 %7, %6
%9 = xor i8 %8, -1
store i8 %9, i8* %4
%10 = load i8, i8* %4
ret void
}

LLVM IR (-O2):
define void @test_43_0(i8* nocapture %0) {
%2 = atomicrmw nand i8* %0, i8 -1 acq_rel
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errbox(char *, char *, int *);
void write_error(char *msg, int daemonized) {
  int response;
  errbox(msg, "Press a key to continue", &response);
}


x86 assembly (clang, -O0):
<write_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed6(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <errbox@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_error>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <errbox@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Press a key to continue\00"
define void @write_error(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = call i32 @errbox(i8* %6, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32* %5)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Press a key to continue\00"
define void @write_error(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @errbox(i8* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32* %3)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
void byteorder_htobebufl(uint8_t *buf, uint32_t val) {
  buf[0] = (uint8_t)(val >> 24);
  buf[1] = (uint8_t)(val >> 16);
  buf[2] = (uint8_t)(val >> 8);
  buf[3] = (uint8_t)(val >> 0);
}


x86 assembly (clang, -O0):
<byteorder_htobebufl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x18,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0xc(%rbp),%eax
sar    $0x0,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<byteorder_htobebufl>:
mov    %esi,%eax
sar    $0x18,%eax
cltq
mov    %rax,(%rdi)
mov    %esi,%eax
sar    $0x10,%eax
cltq
mov    %rax,0x8(%rdi)
movslq %esi,%rax
sar    $0x8,%esi
movslq %esi,%rcx
mov    %rcx,0x10(%rdi)
mov    %rax,0x18(%rdi)
ret

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

LLVM IR (-O2):
define void @byteorder_htobebufl(i64* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 24
%4 = sext i32 %3 to i64
store i64 %4, i64* %0
%5 = ashr i32 %1, 16
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %6, i64* %7
%8 = ashr i32 %1, 8
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i64, i64* %0, i64 2
store i64 %9, i64* %10
%11 = sext i32 %1 to i64
%12 = getelementptr inbounds i64, i64* %0, i64 3
store i64 %11, i64* %12
ret void
}
float dotVectors(const float *u, const float *v) {
  float ans;
  ans = u[0] * v[0] + u[1] * v[1] + u[2] * v[2];
  return ans;
}


x86 assembly (clang, -O0):
<dotVectors>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulss  0x4(%rax),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dotVectors>:
movss  0x4(%rdi),%xmm0
mulss  0x4(%rsi),%xmm0
movss  (%rdi),%xmm1
mulss  (%rsi),%xmm1
addss  %xmm0,%xmm1
movss  0x8(%rdi),%xmm0
mulss  0x8(%rsi),%xmm0
addss  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define float @dotVectors(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = getelementptr inbounds float, float* %0, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = fmul float %6, %8
%10 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %9)
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = tail call float @llvm.fmuladd.f32(float %12, float %14, float %10)
ret float %15
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t abs_diff(uint32_t a, uint32_t b) {
  if (a < b)
    return b - a;
  else
    return a - b;
}


x86 assembly (clang, -O0):
<abs_diff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    112b <abs_diff+0x2b>
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1137 <abs_diff+0x37>
mov    -0x10(%rbp),%rax
sub    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs_diff>:
mov    %rdi,%rax
sub    %rsi,%rax
neg    %rax
sub    %rsi,%rdi
cmovge %rdi,%rax
ret

LLVM IR (-O0):
define i64 @abs_diff(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = icmp slt i64 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i64, i64* %5
%11 = load i64, i64* %4
%12 = sub nsw i64 %10, %11
store i64 %12, i64* %3
br label %17
13: ; preds = %2
%14 = load i64, i64* %4
%15 = load i64, i64* %5
%16 = sub nsw i64 %14, %15
store i64 %16, i64* %3
br label %17
17: ; preds = %13, %9
%18 = load i64, i64* %3
ret i64 %18
}

LLVM IR (-O2):
define i64 @abs_diff(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = sub nsw i64 %1, %0
%5 = sub nsw i64 %0, %1
%6 = select i1 %3, i64 %4, i64 %5
ret i64 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ Drawable;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
void XScreenSaverUnsetAttributes(register Display *dpy, Drawable drawable) {}


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

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

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

LLVM IR (-O2):
define void @XScreenSaverUnsetAttributes(i32* nocapture %0, i32 %1) {
ret void
}
/* Type definitions */
struct ibv_query_device_ex_input {
  int dummy;
};
struct ibv_device_attr_ex {
  int dummy;
};
struct ibv_context {
  int dummy;
};

/* Variables and functions */
int ibv_query_device_ex(struct ibv_context *,
                        struct ibv_query_device_ex_input const *,
                        struct ibv_device_attr_ex *);
int mlx4_glue_query_device_ex(struct ibv_context *context,
                              const struct ibv_query_device_ex_input *input,
                              struct ibv_device_attr_ex *attr) {
  return ibv_query_device_ex(context, input, attr);
}


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

x86 assembly (clang, -O2):
<mlx4_glue_query_device_ex>:
jmp    1030 <ibv_query_device_ex@plt>

LLVM IR (-O0):
%struct.ibv_context = type { i32 }
%struct.ibv_query_device_ex_input = type { i32 }
%struct.ibv_device_attr_ex = type { i32 }
define i32 @mlx4_glue_query_device_ex(%struct.ibv_context* %0, %struct.ibv_query_device_ex_input* %1, %struct.ibv_device_attr_ex* %2) {
%4 = alloca %struct.ibv_context*
%5 = alloca %struct.ibv_query_device_ex_input*
%6 = alloca %struct.ibv_device_attr_ex*
store %struct.ibv_context* %0, %struct.ibv_context** %4
store %struct.ibv_query_device_ex_input* %1, %struct.ibv_query_device_ex_input** %5
store %struct.ibv_device_attr_ex* %2, %struct.ibv_device_attr_ex** %6
%7 = load %struct.ibv_context*, %struct.ibv_context** %4
%8 = load %struct.ibv_query_device_ex_input*, %struct.ibv_query_device_ex_input** %5
%9 = load %struct.ibv_device_attr_ex*, %struct.ibv_device_attr_ex** %6
%10 = call i32 @ibv_query_device_ex(%struct.ibv_context* %7, %struct.ibv_query_device_ex_input* %8, %struct.ibv_device_attr_ex* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.ibv_context = type { i32 }
%struct.ibv_query_device_ex_input = type { i32 }
%struct.ibv_device_attr_ex = type { i32 }
define i32 @mlx4_glue_query_device_ex(%struct.ibv_context* %0, %struct.ibv_query_device_ex_input* %1, %struct.ibv_device_attr_ex* %2) {
%4 = tail call i32 @ibv_query_device_ex(%struct.ibv_context* %0, %struct.ibv_query_device_ex_input* %1, %struct.ibv_device_attr_ex* %2)
ret i32 %4
}
/* Variables and functions */
scalar_t__ isalpha(char);
char isLetter(char c) { return ((isalpha(c)) || (c == '_')); }


x86 assembly (clang, -O0):
<isLetter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1146 <isLetter+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @isLetter(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isalpha(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 95
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
%13 = trunc i32 %12 to i8
ret i8 %13
}

LLVM IR (-O2):
define signext i8 @isLetter(i8 signext %0) {
%2 = tail call i64 @isalpha(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 95
%5 = or i1 %4, %3
%6 = zext i1 %5 to i8
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ clog_init();
void clog_init_(void) { clog_init(); }


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

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

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

LLVM IR (-O2):
define void @clog_init_() {
%1 = tail call i32 (...) @clog_init()
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
typedef int time_t;
struct TYPE_2__ {
  int tv_sec;
  scalar_t__ tv_nsec;
};
struct itimerspec {
  TYPE_1__ it_value;
};

/* Variables and functions */
int /*<<< orphan*/ timerfd_gettime(int, struct itimerspec *);
time_t itimer_get_expiration(int fd) {
  struct itimerspec timer;
  time_t expiration;
  timerfd_gettime(fd, &timer);
  expiration = timer.it_value.tv_sec;
  if (timer.it_value.tv_nsec)
    expiration += 1;
  return expiration;
}


x86 assembly (clang, -O0):
<itimer_get_expiration>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
call   1030 <timerfd_gettime@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1141 <itimer_get_expiration+0x31>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itimer_get_expiration>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rsi
call   1030 <timerfd_gettime@plt>
mov    0x8(%rsp),%eax
cmpq   $0x1,0x10(%rsp)
sbb    $0xffffffff,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.itimerspec = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32, i64 }
define i32 @itimer_get_expiration(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.itimerspec
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @timerfd_gettime(i32 %5, %struct.itimerspec* %3)
%7 = getelementptr inbounds %struct.itimerspec, %struct.itimerspec* %3, i32 0, i32 0
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
%9 = load i32, i32* %8
store i32 %9, i32* %4
%10 = getelementptr inbounds %struct.itimerspec, %struct.itimerspec* %3, i32 0, i32 0
%11 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %10, i32 0, i32 1
%12 = load i64, i64* %11
%13 = icmp ne i64 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %1
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
br label %17
17: ; preds = %14, %1
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
%struct.itimerspec = type { %struct.TYPE_2__ }
%struct.TYPE_2__ = type { i32, i64 }
define i32 @itimer_get_expiration(i32 %0) {
%2 = alloca %struct.itimerspec
%3 = bitcast %struct.itimerspec* %2 to i8*
%4 = call i32 @timerfd_gettime(i32 %0, %struct.itimerspec* %2)
%5 = getelementptr inbounds %struct.itimerspec, %struct.itimerspec* %2, i64 0, i32 0, i32 0
%6 = load i32, i32* %5
%7 = getelementptr inbounds %struct.itimerspec, %struct.itimerspec* %2, i64 0, i32 0, i32 1
%8 = load i64, i64* %7
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
%11 = add nsw i32 %6, %10
ret i32 %11
}
void ABGRToUVRow_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @ABGRToUVRow_Any_AVX2() {
ret void
}
/* Variables and functions */
int f(int);
int /*<<< orphan*/ printf(char *, int);
int main() { printf("%d\n", f(1)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <f@plt>
mov    %eax,%esi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @f(i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ a();
int /*<<< orphan*/ c();
void d() {
  a();
  c();
}


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

x86 assembly (clang, -O2):
<d>:
push   %rax
xor    %eax,%eax
call   1040 <a@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <c@plt>

LLVM IR (-O0):
define void @d() {
%1 = call i32 (...) @a()
%2 = call i32 (...) @c()
ret void
}

LLVM IR (-O2):
define void @d() {
%1 = tail call i32 (...) @a()
%2 = tail call i32 (...) @c()
ret void
}
/* Type definitions */
struct _MNE {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *getfilename(char *);
int /*<<< orphan*/ programlabel();
int /*<<< orphan*/ pushinclude(char *);
void v_include(char *str, struct _MNE *dummy) {
  char *buf;
  programlabel();
  buf = getfilename(str);
  pushinclude(buf);
  if (buf != str)
    free(buf);
}


x86 assembly (clang, -O0):
<v_include>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1060 <programlabel@plt>
mov    -0x8(%rbp),%rdi
call   1050 <getfilename@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <pushinclude@plt>
mov    -0x18(%rbp),%rax
cmp    -0x8(%rbp),%rax
je     1184 <v_include+0x44>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v_include>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1060 <programlabel@plt>
mov    %r14,%rdi
call   1050 <getfilename@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <pushinclude@plt>
cmp    %r14,%rbx
je     1175 <v_include+0x35>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct._MNE = type { i32 }
define void @v_include(i8* %0, %struct._MNE* %1) {
%3 = alloca i8*
%4 = alloca %struct._MNE*
%5 = alloca i8*
store i8* %0, i8** %3
store %struct._MNE* %1, %struct._MNE** %4
%6 = call i32 (...) @programlabel()
%7 = load i8*, i8** %3
%8 = call i8* @getfilename(i8* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = call i32 @pushinclude(i8* %9)
%11 = load i8*, i8** %5
%12 = load i8*, i8** %3
%13 = icmp ne i8* %11, %12
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = load i8*, i8** %5
%16 = call i32 @free(i8* %15)
br label %17
17: ; preds = %14, %2
ret void
}

LLVM IR (-O2):
%struct._MNE = type { i32 }
define void @v_include(i8* %0, %struct._MNE* nocapture readnone %1) {
%3 = tail call i32 (...) @programlabel()
%4 = tail call i8* @getfilename(i8* %0)
%5 = tail call i32 @pushinclude(i8* %4)
%6 = icmp eq i8* %4, %0
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = tail call i32 @free(i8* %4)
br label %9
9: ; preds = %7, %2
ret void
}
double pow(double x, double pow) {
  int i;
  double val = x;
  for (i = 0; i < pow; i++) {
    val *= x;
  }
  return val;
}


x86 assembly (clang, -O0):
<pow>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1150 <pow+0x50>
movsd  -0x8(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111f <pow+0x1f>
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow>:
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jbe    1138 <pow+0x38>
mov    $0x1,%eax
movapd %xmm0,%xmm2
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xorps  %xmm3,%xmm3
cvtsi2sd %eax,%xmm3
mulsd  %xmm0,%xmm2
add    $0x1,%eax
ucomisd %xmm3,%xmm1
ja     1120 <pow+0x20>
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @pow(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
store double %7, double* %6
store i32 0, i32* %5
br label %8
8: ; preds = %17, %2
%9 = load i32, i32* %5
%10 = sitofp i32 %9 to double
%11 = load double, double* %4
%12 = fcmp olt double %10, %11
br i1 %12, label %13, label %20
13: ; preds = %8
%14 = load double, double* %3
%15 = load double, double* %6
%16 = fmul double %15, %14
store double %16, double* %6
br label %17
17: ; preds = %13
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %8
20: ; preds = %8
%21 = load double, double* %6
ret double %21
}

LLVM IR (-O2):
define double @pow(double %0, double %1) {
%3 = fcmp ogt double %1, 0.000000e+00
br i1 %3, label %4, label %11
4: ; preds = %2, %4
%5 = phi double [ %7, %4 ], [ %0, %2 ]
%6 = phi i32 [ %8, %4 ], [ 0, %2 ]
%7 = fmul double %5, %0
%8 = add nuw nsw i32 %6, 1
%9 = sitofp i32 %8 to double
%10 = fcmp olt double %9, %1
br i1 %10, label %4, label %11
11: ; preds = %4, %2
%12 = phi double [ %0, %2 ], [ %7, %4 ]
ret double %12
}
/* Variables and functions */
int push_source(char const *, int /*<<< orphan*/);
int grecs_preproc_init(const char *name) { return push_source(name, 0); }


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

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

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

LLVM IR (-O2):
define i32 @grecs_preproc_init(i8* %0) {
%2 = tail call i32 @push_source(i8* %0, i32 0)
ret i32 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t UARTParityModeGet(uint32_t ui32Base) {
  ;
  return ((*((volatile uint32_t *)(ui32Base + 0x0000002C))) &
          (0x00000080 | 0x00000004 | 0x00000002));
}


x86 assembly (clang, -O0):
<UARTParityModeGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x2c,%eax
cltq
mov    (%rax),%eax
and    $0x86,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTParityModeGet>:
movslq %edi,%rcx
mov    $0x86,%eax
and    0x2c(%rcx),%eax
ret

LLVM IR (-O0):
define i32 @UARTParityModeGet(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 44
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, 134
ret i32 %8
}

LLVM IR (-O2):
define i32 @UARTParityModeGet(i32 %0) {
%2 = add nsw i32 %0, 44
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = and i32 %5, 134
ret i32 %6
}
/* Variables and functions */
size_t base32_encoding_length(size_t src_len) {
  return (((src_len + 5 - 1) / 5) * 8);
}


x86 assembly (clang, -O0):
<base32_encoding_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x5,%rax
sub    $0x1,%rax
mov    $0x5,%ecx
xor    %edx,%edx
div    %rcx
shl    $0x3,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<base32_encoding_length>:
lea    0x4(%rdi),%rax
movabs $0xcccccccccccccccd,%rcx
cc cc cc
mul    %rcx
lea    (%rdx,%rdx,1),%rax
and    $0xfffffffffffffff8,%rax
ret

LLVM IR (-O0):
define i64 @base32_encoding_length(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add i64 %3, 5
%5 = sub i64 %4, 1
%6 = udiv i64 %5, 5
%7 = mul i64 %6, 8
ret i64 %7
}

LLVM IR (-O2):
define i64 @base32_encoding_length(i64 %0) {
%2 = add i64 %0, 4
%3 = udiv i64 %2, 5
%4 = shl i64 %3, 3
ret i64 %4
}
/* Variables and functions */
void assert_failed(char *, char *, int, char const *);
int /*<<< orphan*/ free(void *);
void w_free(void *ptr) {
  ((ptr != (void *)0)
       ? ((void)0)
       : (assert_failed("ptr != (void *)0",
                        "/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/proebrock/"
                        "sisyphos/refs/heads/master/wrapper.c",
                        75, (const char *)0)));
  free(ptr);
}


x86 assembly (clang, -O0):
<w_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113c <w_free+0x1c>
jmp    1158 <w_free+0x38>
lea    0xebd(%rip),%rdi
lea    0xec7(%rip),%rsi
mov    $0x4b,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1040 <assert_failed@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<w_free>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jne    1143 <w_free+0x23>
lea    0xed0(%rip),%rdi
lea    0xeda(%rip),%rsi
mov    $0x4b,%edx
xor    %ecx,%ecx
call   1040 <assert_failed@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"ptr != (void *)0\00"
@.str.1 = [137 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/proebrock/sisyphos/refs/heads/master/wrapper.c\00"
define void @w_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %5
%8 = load i8*, i8** %2
%9 = call i32 @free(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"ptr != (void *)0\00"
@.str.1 = [137 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/proebrock/sisyphos/refs/heads/master/wrapper.c\00"
define void @w_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %4
3: ; preds = %1
tail call void @assert_failed(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([137 x i8], [137 x i8]* @.str.1, i64 0, i64 0), i32 75, i8* null)
br label %4
4: ; preds = %1, %3
%5 = tail call i32 @free(i8* %0)
ret void
}
void fx_plot_obj(void) {}


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

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

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

LLVM IR (-O2):
define void @fx_plot_obj() {
ret void
}
pop(int *top, int array[]) {
  int i = 0;
  i = array[*top - 1];
  (*top)--;
  return i;
}


x86 assembly (clang, -O0):
<pop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pop>:
movslq (%rdi),%rcx
mov    -0x4(%rsi,%rcx,4),%eax
add    $0xffffffffffffffff,%rcx
mov    %ecx,(%rdi)
ret

LLVM IR (-O0):
define i32 @pop(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
%6 = load i32*, i32** %4
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
%9 = sub nsw i32 %8, 1
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %6, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %5
%13 = load i32*, i32** %3
%14 = load i32, i32* %13
%15 = add nsw i32 %14, -1
store i32 %15, i32* %13
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
define i32 @pop(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = add nsw i32 %3, -1
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* %1, i64 %5
%7 = load i32, i32* %6
store i32 %4, i32* %0
ret i32 %7
}
/* Variables and functions */
int strlen(char *);
char toupper(char);
void ToUpper(char *st) {
  int len = strlen(st);
  for (int i = 0; i < len; i++) {
    st[i] = toupper(st[i]);
  }
}


x86 assembly (clang, -O0):
<ToUpper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1177 <ToUpper+0x57>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <toupper@plt>
mov    %al,%dl
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    113f <ToUpper+0x1f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ToUpper>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
call   1040 <strlen@plt>
test   %eax,%eax
jle    1157 <ToUpper+0x37>
mov    %eax,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
call   1030 <toupper@plt>
mov    %al,(%r15,%rbx,1)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1140 <ToUpper+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

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


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

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

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

LLVM IR (-O2):
define void @BN_rshift() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint8_t u64_b7(uint64_t value) {
  return (uint8_t)((value & 0xFF00000000000000) >> 56);
}


x86 assembly (clang, -O0):
<u64_b7>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rax
movabs $0xff00000000000000,%rcx
and    %rcx,%rax
shr    $0x38,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<u64_b7>:
movslq %edi,%rax
shr    $0x38,%rax
ret

LLVM IR (-O0):
define i32 @u64_b7(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = and i64 %4, -72057594037927936
%6 = lshr i64 %5, 56
%7 = trunc i64 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @u64_b7(i32 %0) {
%2 = sext i32 %0 to i64
%3 = lshr i64 %2, 56
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int _clear(void) {
  printf("%c[2J%c[f", 0x1b, 0x1b);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"%c[2J%c[f\00"
define i32 @_clear() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 27, i32 27)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%c[2J%c[f\00"
define i32 @_clear() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 27, i32 27)
ret i32 0
}