xunge/DecIR huggingface dataset:
/* Type definitions */
struct inthash {
  int dummy;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
void *ih_getval(struct inthash *, int /*<<< orphan*/);
void *ih_getval2(struct inthash *ih, int64_t key1, int64_t key2) {
  struct inthash *ih2 = ih_getval(ih, key1);
  if (!ih2)
    return NULL;
  return ih_getval(ih2, key2);
}


x86 assembly (clang, -O0):
<ih_getval2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <ih_getval@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    114a <ih_getval2+0x3a>
movq   $0x0,-0x8(%rbp)
jmp    115a <ih_getval2+0x4a>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1030 <ih_getval@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ih_getval2>:
push   %rbx
mov    %edx,%ebx
call   1030 <ih_getval@plt>
test   %rax,%rax
je     1128 <ih_getval2+0x18>
mov    %rax,%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <ih_getval@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.inthash = type { i32 }
define i8* @ih_getval2(%struct.inthash* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca %struct.inthash*
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.inthash*
store %struct.inthash* %0, %struct.inthash** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%9 = load %struct.inthash*, %struct.inthash** %5
%10 = load i32, i32* %6
%11 = call i8* @ih_getval(%struct.inthash* %9, i32 %10)
%12 = bitcast i8* %11 to %struct.inthash*
store %struct.inthash* %12, %struct.inthash** %8
%13 = load %struct.inthash*, %struct.inthash** %8
%14 = icmp ne %struct.inthash* %13, null
br i1 %14, label %16, label %15
15: ; preds = %3
store i8* null, i8** %4
br label %20
16: ; preds = %3
%17 = load %struct.inthash*, %struct.inthash** %8
%18 = load i32, i32* %7
%19 = call i8* @ih_getval(%struct.inthash* %17, i32 %18)
store i8* %19, i8** %4
br label %20
20: ; preds = %16, %15
%21 = load i8*, i8** %4
ret i8* %21
}

LLVM IR (-O2):
%struct.inthash = type { i32 }
define i8* @ih_getval2(%struct.inthash* %0, i32 %1, i32 %2) {
%4 = tail call i8* @ih_getval(%struct.inthash* %0, i32 %1)
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = bitcast i8* %4 to %struct.inthash*
%8 = tail call i8* @ih_getval(%struct.inthash* %7, i32 %2)
br label %9
9: ; preds = %3, %6
%10 = phi i8* [ %8, %6 ], [ null, %3 ]
ret i8* %10
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int vring_need_event(uint16_t event_idx, uint16_t new_idx, uint16_t old) {
  return (uint16_t)(new_idx - event_idx - 1) < (uint16_t)(new_idx - old);
}


x86 assembly (clang, -O0):
<vring_need_event>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    -0x8(%rbp),%ecx
sub    -0xc(%rbp),%ecx
cmp    %ecx,%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vring_need_event>:
not    %edi
add    %esi,%edi
sub    %edx,%esi
xor    %eax,%eax
cmp    %esi,%edi
setl   %al
ret

LLVM IR (-O0):
define i32 @vring_need_event(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* %5
%8 = load i32, i32* %4
%9 = sub nsw i32 %7, %8
%10 = sub nsw i32 %9, 1
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = sub nsw i32 %11, %12
%14 = icmp slt i32 %10, %13
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @vring_need_event(i32 %0, i32 %1, i32 %2) {
%4 = xor i32 %0, -1
%5 = add i32 %4, %1
%6 = sub nsw i32 %1, %2
%7 = icmp slt i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ display_chunked_string(int);
void op_dsp() { display_chunked_string(1); }


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

x86 assembly (clang, -O2):
<op_dsp>:
mov    $0x1,%edi
jmp    1030 <display_chunked_string@plt>

LLVM IR (-O0):
define void @op_dsp() {
%1 = call i32 @display_chunked_string(i32 1)
ret void
}

LLVM IR (-O2):
define void @op_dsp() {
%1 = tail call i32 @display_chunked_string(i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
struct user_desc {
  int dummy;
};
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int clone4_(int (*fn)(void *), void *child_stack, uint64_t flags, void *arg,
            pid_t *ptid, struct user_desc *tls, pid_t *ctid) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<clone4_>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%ecx
mov    0x2ea9(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<clone4_>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.user_desc = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @clone4_(i32 (i8*)* %0, i8* %1, i32 %2, i8* %3, i32* %4, %struct.user_desc* %5, i32* %6) {
%8 = alloca i32 (i8*)*
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32*
%13 = alloca %struct.user_desc*
%14 = alloca i32*
store i32 (i8*)* %0, i32 (i8*)** %8
store i8* %1, i8** %9
store i32 %2, i32* %10
store i8* %3, i8** %11
store i32* %4, i32** %12
store %struct.user_desc* %5, %struct.user_desc** %13
store i32* %6, i32** %14
%15 = load i32, i32* @ENOSYS
store i32 %15, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.user_desc = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @clone4_(i32 (i8*)* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i8* nocapture readnone %3, i32* nocapture readnone %4, %struct.user_desc* nocapture readnone %5, i32* nocapture readnone %6) {
%8 = load i32, i32* @ENOSYS
store i32 %8, i32* @errno
ret i32 -1
}
int _Rice_NumBits(unsigned int x) {
  int n;
  for (n = 32; !(x & 0x80000000) && (n > 0); --n)
    x <<= 1;
  return n;
}


x86 assembly (clang, -O0):
<_Rice_NumBits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x20,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x80000000,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    112f <_Rice_NumBits+0x2f>
cmpl   $0x0,-0x8(%rbp)
setg   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113f <_Rice_NumBits+0x3f>
jmp    1156 <_Rice_NumBits+0x56>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <_Rice_NumBits+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_Rice_NumBits>:
test   %edi,%edi
js     1121 <_Rice_NumBits+0x21>
mov    $0x20,%ecx
nopl   0x0(%rax)
add    %edi,%edi
lea    -0x1(%rcx),%eax
test   %edi,%edi
js     1120 <_Rice_NumBits+0x20>
cmp    $0x1,%ecx
mov    %eax,%ecx
ja     1110 <_Rice_NumBits+0x10>
ret
mov    $0x20,%eax
ret

LLVM IR (-O0):
define i32 @_Rice_NumBits(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 32, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i32, i32* %2
%6 = and i32 %5, -2147483648
%7 = icmp ne i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 0
br label %11
11: ; preds = %8, %4
%12 = phi i1 [ false, %4 ], [ %10, %8 ]
br i1 %12, label %13, label %19
13: ; preds = %11
%14 = load i32, i32* %2
%15 = shl i32 %14, 1
store i32 %15, i32* %2
br label %16
16: ; preds = %13
%17 = load i32, i32* %3
%18 = add nsw i32 %17, -1
store i32 %18, i32* %3
br label %4
19: ; preds = %11
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @_Rice_NumBits(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 32, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = shl nuw i32 %5, 1
%7 = add nsw i32 %4, -1
%8 = icmp sgt i32 %6, -1
%9 = icmp ugt i32 %4, 1
%10 = select i1 %8, i1 %9, i1 false
br i1 %10, label %3, label %11
11: ; preds = %3, %1
%12 = phi i32 [ 32, %1 ], [ %7, %3 ]
ret i32 %12
}
void pbl_ShortToBuf(unsigned char *buf, int s) {
  *buf++ = (unsigned char)(s >> 8);
  *buf = (unsigned char)(s);
}


x86 assembly (clang, -O0):
<pbl_ShortToBuf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<pbl_ShortToBuf>:
rol    $0x8,%si
mov    %si,(%rdi)
ret

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

LLVM IR (-O2):
define void @pbl_ShortToBuf(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 8
%4 = trunc i32 %3 to i8
%5 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %4, i8* %0
%6 = trunc i32 %1 to i8
store i8 %6, i8* %5
ret void
}
void handle_TERM(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @handle_TERM(i32 %0) {
ret void
}
unsigned choose(unsigned n, unsigned k) {
  if (k == 0)
    return 1;
  return (n * choose(n - 1, k - 1)) / k;
}


x86 assembly (clang, -O0):
<choose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1134 <choose+0x24>
movl   $0x1,-0x4(%rbp)
jmp    115b <choose+0x4b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <choose@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
imul   %ecx,%eax
xor    %edx,%edx
divl   -0xc(%rbp)
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<choose>:
test   %esi,%esi
je     1139 <choose+0x29>
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%r14d
lea    -0x1(%r14),%edi
lea    -0x1(%rbx),%esi
call   1030 <choose@plt>
imul   %r14d,%eax
xor    %edx,%edx
div    %ebx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @choose(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 1, i32* %3
br label %19
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* %4
%12 = sub i32 %11, 1
%13 = load i32, i32* %5
%14 = sub i32 %13, 1
%15 = call i32 @choose(i32 %12, i32 %14)
%16 = mul i32 %10, %15
%17 = load i32, i32* %5
%18 = udiv i32 %16, %17
store i32 %18, i32* %3
br label %19
19: ; preds = %9, %8
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @choose(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2, %6
%5 = phi i32 [ %11, %6 ], [ 1, %2 ]
ret i32 %5
6: ; preds = %2
%7 = add i32 %0, -1
%8 = add i32 %1, -1
%9 = tail call i32 @choose(i32 %7, i32 %8)
%10 = mul i32 %9, %0
%11 = udiv i32 %10, %1
br label %4
}
void f(char *cp) {
#pragma acc parallel pcreate(cp [6:8])
  ;
}


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

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

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

LLVM IR (-O2):
define void @f(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct tokeniser {
  int dummy;
};

/* Variables and functions */
int next_char(struct tokeniser *);
scalar_t__ white_space(struct tokeniser *, int);
int next_real_char(struct tokeniser *t) {
  while (1) {
    int ch = next_char(t);
    if (white_space(t, ch))
      continue;
    return ch;
  }
}


x86 assembly (clang, -O0):
<next_real_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <next_char@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <white_space@plt>
cmp    $0x0,%rax
je     1153 <next_real_char+0x33>
jmp    112c <next_real_char+0xc>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_real_char>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <next_char@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <white_space@plt>
test   %rax,%rax
jne    1130 <next_real_char+0x10>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.tokeniser = type { i32 }
define i32 @next_real_char(%struct.tokeniser* %0) {
%2 = alloca %struct.tokeniser*
%3 = alloca i32
store %struct.tokeniser* %0, %struct.tokeniser** %2
br label %4
4: ; preds = %1, %11
%5 = load %struct.tokeniser*, %struct.tokeniser** %2
%6 = call i32 @next_char(%struct.tokeniser* %5)
store i32 %6, i32* %3
%7 = load %struct.tokeniser*, %struct.tokeniser** %2
%8 = load i32, i32* %3
%9 = call i64 @white_space(%struct.tokeniser* %7, i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %4
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
%struct.tokeniser = type { i32 }
define i32 @next_real_char(%struct.tokeniser* %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @next_char(%struct.tokeniser* %0)
%4 = tail call i64 @white_space(%struct.tokeniser* %0, i32 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %2
6: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ modf(double, double *);
double fmod(double x, double y) {
  double r = 0;
  double p = 0;
  r = x / y;
  modf(r, &p);
  return p * y;
}


x86 assembly (clang, -O0):
<fmod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    -0x20(%rbp),%rdi
call   1030 <modf@plt>
movsd  -0x20(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fmod>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movq   $0x0,0x8(%rsp)
divsd  %xmm1,%xmm0
lea    0x8(%rsp),%rdi
call   1030 <modf@plt>
movsd  0x10(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @fmod(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
store double 0.000000e+00, double* %5
store double 0.000000e+00, double* %6
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fdiv double %7, %8
store double %9, double* %5
%10 = load double, double* %5
%11 = call i32 @modf(double %10, double* %6)
%12 = load double, double* %6
%13 = load double, double* %4
%14 = fmul double %12, %13
ret double %14
}

LLVM IR (-O2):
define double @fmod(double %0, double %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
store double 0.000000e+00, double* %3
%5 = fdiv double %0, %1
%6 = call i32 @modf(double %5, double* %3)
%7 = load double, double* %3
%8 = fmul double %7, %1
ret double %8
}
/* Variables and functions */
int standout();
int t_attrout() { return standout(); }


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

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

LLVM IR (-O0):
define i32 @t_attrout() {
%1 = call i32 (...) @standout()
ret i32 %1
}

LLVM IR (-O2):
define i32 @t_attrout() {
%1 = tail call i32 (...) @standout()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void sent_print_cb(const char *text) { printf("Sentence: \"%s\"\n", text); }


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

x86 assembly (clang, -O2):
<sent_print_cb>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [16 x i8] c"Sentence: \22%s\22\0A\00"
define void @sent_print_cb(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
unsigned int tiff_type2size(const unsigned int type) {
  switch (type) {
  case 1:
  case 2:
  case 6:
  case 7:
    return 1;
  case 3:
  case 8:
    return 2;
  case 4:
  case 9:
  case 11:
  case 13:
    return 4;
  case 5:
  case 10:
  case 12:
  case 16:
  case 17:
  case 18:
    return 8;
  default:
    return 1;
  }
}


x86 assembly (clang, -O0):
<tiff_type2size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x11,%eax
ja     1160 <tiff_type2size+0x60>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    1167 <tiff_type2size+0x67>
movl   $0x2,-0x4(%rbp)
jmp    1167 <tiff_type2size+0x67>
movl   $0x4,-0x4(%rbp)
jmp    1167 <tiff_type2size+0x67>
movl   $0x8,-0x4(%rbp)
jmp    1167 <tiff_type2size+0x67>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tiff_type2size>:
add    $0xfffffffd,%edi
mov    $0x1,%eax
cmp    $0xf,%edi
ja     111a <tiff_type2size+0x1a>
movslq %edi,%rax
lea    0xee9(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

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

LLVM IR (-O2):
@switch.table.tiff_type2size = [16 x i32] [i32 2, i32 4, i32 8, i32 1, i32 1, i32 2, i32 4, i32 8, i32 4, i32 8, i32 4, i32 1, i32 1, i32 8, i32 8, i32 8]
define i32 @tiff_type2size(i32 %0) {
%2 = add i32 %0, -3
%3 = icmp ult i32 %2, 16
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [16 x i32], [16 x i32]* @switch.table.tiff_type2size, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ create_cond_wait_loop_3();
int /*<<< orphan*/ create_cond_wait_loop_4();
int /*<<< orphan*/ create_mutex_lock_loop_1();
int /*<<< orphan*/ create_mutex_lock_loop_2();
int /*<<< orphan*/ create_mutex_lock_loop_5();
int /*<<< orphan*/ sleep(int);
int main() {
  create_mutex_lock_loop_1();
  create_mutex_lock_loop_2();
  create_cond_wait_loop_3();
  create_cond_wait_loop_4();
  create_mutex_lock_loop_5();
  while (1)
    sleep(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1070 <create_mutex_lock_loop_1@plt>
mov    $0x0,%al
call   1040 <create_mutex_lock_loop_2@plt>
mov    $0x0,%al
call   1050 <create_cond_wait_loop_3@plt>
mov    $0x0,%al
call   1030 <create_cond_wait_loop_4@plt>
mov    $0x0,%al
call   1060 <create_mutex_lock_loop_5@plt>
mov    $0x1,%edi
call   1080 <sleep@plt>
jmp    1192 <main+0x32>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <create_mutex_lock_loop_1@plt>
xor    %eax,%eax
call   1040 <create_mutex_lock_loop_2@plt>
xor    %eax,%eax
call   1050 <create_cond_wait_loop_3@plt>
xor    %eax,%eax
call   1030 <create_cond_wait_loop_4@plt>
xor    %eax,%eax
call   1060 <create_mutex_lock_loop_5@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x1,%edi
call   1080 <sleep@plt>
jmp    1190 <main+0x30>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @create_mutex_lock_loop_1()
%3 = call i32 (...) @create_mutex_lock_loop_2()
%4 = call i32 (...) @create_cond_wait_loop_3()
%5 = call i32 (...) @create_cond_wait_loop_4()
%6 = call i32 (...) @create_mutex_lock_loop_5()
br label %7
7: ; preds = %0, %7
%8 = call i32 @sleep(i32 1)
br label %7
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @create_mutex_lock_loop_1()
%2 = tail call i32 (...) @create_mutex_lock_loop_2()
%3 = tail call i32 (...) @create_cond_wait_loop_3()
%4 = tail call i32 (...) @create_cond_wait_loop_4()
%5 = tail call i32 (...) @create_mutex_lock_loop_5()
br label %6
6: ; preds = %0, %6
%7 = tail call i32 @sleep(i32 1)
br label %6
}
int getRate(int type) {
  switch (type) {
  case 1:
    return 2;
    ;
    break;
  case 2:
    return 3;
    ;
    break;
  case 3:
    return 4;
    ;
  default:
    return -1;
  }
}


x86 assembly (clang, -O0):
<getRate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x1,%eax
je     113d <getRate+0x3d>
jmp    111b <getRate+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     1149 <getRate+0x49>
jmp    112c <getRate+0x2c>
mov    -0xc(%rbp),%eax
sub    $0x3,%eax
je     1155 <getRate+0x55>
jmp    1161 <getRate+0x61>
movl   $0x2,-0x4(%rbp)
jmp    1168 <getRate+0x68>
movl   $0x3,-0x4(%rbp)
jmp    1168 <getRate+0x68>
movl   $0x4,-0x4(%rbp)
jmp    1168 <getRate+0x68>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getRate>:
lea    -0x1(%rdi),%eax
lea    0x1(%rdi),%ecx
cmp    $0x3,%eax
mov    $0xffffffff,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @getRate(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 1, label %5
i32 2, label %6
i32 3, label %7
]
5: ; preds = %1
store i32 2, i32* %2
br label %9
6: ; preds = %1
store i32 3, i32* %2
br label %9
7: ; preds = %1
store i32 4, i32* %2
br label %9
8: ; preds = %1
store i32 -1, i32* %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @getRate(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 3
%4 = add i32 %0, 1
%5 = select i1 %3, i32 %4, i32 -1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ rd_mean_var(double const *, size_t, int /*<<< orphan*/ *,
                               double *);
double rd_var(const double *x, size_t nmemb) {
  double var;
  rd_mean_var(x, nmemb, NULL, &var);
  return var;
}


x86 assembly (clang, -O0):
<rd_var>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
lea    -0x18(%rbp),%rcx
call   1030 <rd_mean_var@plt>
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rd_var>:
push   %rax
mov    %rsp,%rcx
xor    %edx,%edx
call   1030 <rd_mean_var@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @rd_var(double* %0, i64 %1) {
%3 = alloca double*
%4 = alloca i64
%5 = alloca double
store double* %0, double** %3
store i64 %1, i64* %4
%6 = load double*, double** %3
%7 = load i64, i64* %4
%8 = call i32 @rd_mean_var(double* %6, i64 %7, i32* null, double* %5)
%9 = load double, double* %5
ret double %9
}

LLVM IR (-O2):
define double @rd_var(double* %0, i64 %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = call i32 @rd_mean_var(double* %0, i64 %1, i32* null, double* %3)
%6 = load double, double* %3
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void print_usage(char *file) { printf("%s <dev>\n", file); }


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

x86 assembly (clang, -O2):
<print_usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%s <dev>\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%s <dev>\0A\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
int /*<<< orphan*/ system(char *);
char *get_url(char *ifid, char *from) {
  char cmdbuf[1024];
  sprintf(cmdbuf, "curl --silent --fail %s/metadata/%s", from, ifid);
  system(cmdbuf);
  return ifid;
}


x86 assembly (clang, -O0):
<get_url>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xeb7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x410(%rbp),%rdi
call   1030 <system@plt>
mov    -0x8(%rbp),%rax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_url>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rsi,%rdx
mov    %rdi,%rbx
lea    0xec9(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rcx
call   1040 <sprintf@plt>
mov    %r14,%rdi
call   1030 <system@plt>
mov    %rbx,%rax
add    $0x408,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [36 x i8] c"curl --silent --fail %s/metadata/%s\00"
define i8* @get_url(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1024 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %4
%8 = load i8*, i8** %3
%9 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8)
%10 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%11 = call i32 @system(i8* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@.str = [36 x i8] c"curl --silent --fail %s/metadata/%s\00"
define i8* @get_url(i8* returned %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
%6 = call i32 @system(i8* %4)
ret i8* %0
}
void rct_turn_off_usb_pll(void) {}


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

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

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

LLVM IR (-O2):
define void @rct_turn_off_usb_pll() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NDELAY;
int fcntl(int, int /*<<< orphan*/, ...);
int ndelay_on(int fd) {
  register int got = fcntl(fd, F_GETFL);
  return (got == -1) ? -1 : fcntl(fd, F_SETFL, got | O_NDELAY);
}


x86 assembly (clang, -O0):
<ndelay_on>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1148 <ndelay_on+0x38>
mov    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    116a <ndelay_on+0x5a>
mov    -0x4(%rbp),%edi
mov    0x2e8e(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
mov    0x2e7a(%rip),%rax
or     (%rax),%edx
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ndelay_on>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
call   1030 <fcntl@plt>
cmp    $0xffffffff,%eax
je     1146 <ndelay_on+0x36>
mov    0x2eb1(%rip),%rcx
mov    (%rcx),%esi
mov    0x2ea0(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %eax,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <fcntl@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NDELAY = global i32 0
define i32 @ndelay_on(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @F_GETFL
%6 = call i32 (i32, i32, ...) @fcntl(i32 %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %10
9: ; preds = %1
br label %17
10: ; preds = %1
%11 = load i32, i32* %2
%12 = load i32, i32* @F_SETFL
%13 = load i32, i32* %3
%14 = load i32, i32* @O_NDELAY
%15 = or i32 %13, %14
%16 = call i32 (i32, i32, ...) @fcntl(i32 %11, i32 %12, i32 %15)
br label %17
17: ; preds = %10, %9
%18 = phi i32 [ -1, %9 ], [ %16, %10 ]
ret i32 %18
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NDELAY = global i32 0
define i32 @ndelay_on(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %2)
%4 = icmp eq i32 %3, -1
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = load i32, i32* @F_SETFL
%7 = load i32, i32* @O_NDELAY
%8 = or i32 %7, %3
%9 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %6, i32 %8)
br label %10
10: ; preds = %1, %5
%11 = phi i32 [ %9, %5 ], [ -1, %1 ]
ret i32 %11
}
/* Variables and functions */
int ap_cmd_get_int(int, int, int *);
int ap_is_paused(int session, int *paused) {
  return (ap_cmd_get_int(session, 0xcc30, paused));
}


x86 assembly (clang, -O0):
<ap_is_paused>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0xcc30,%esi
call   1030 <ap_cmd_get_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ap_is_paused>:
mov    %rsi,%rdx
mov    $0xcc30,%esi
jmp    1030 <ap_cmd_get_int@plt>

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

LLVM IR (-O2):
define i32 @ap_is_paused(i32 %0, i32* %1) {
%3 = tail call i32 @ap_cmd_get_int(i32 %0, i32 52272, i32* %1)
ret i32 %3
}
/* Variables and functions */
long DIV_ROUND_CLOSEST(int, int);
long kelvin_to_celsius(long t) { return t + DIV_ROUND_CLOSEST(-273150, 1000); }


x86 assembly (clang, -O0):
<kelvin_to_celsius>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0xfffbd502,%edi
mov    $0x3e8,%esi
call   1030 <DIV_ROUND_CLOSEST@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kelvin_to_celsius>:
push   %rbx
mov    %rdi,%rbx
mov    $0xfffbd502,%edi
mov    $0x3e8,%esi
call   1030 <DIV_ROUND_CLOSEST@plt>
add    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @kelvin_to_celsius(i64 %0) {
%2 = tail call i64 @DIV_ROUND_CLOSEST(i32 -273150, i32 1000)
%3 = add nsw i64 %2, %0
ret i64 %3
}
float Vector_Dot_Product(float vector1[3], float vector2[3]) {
  float op = 0;
  int c = 0;
  while (c < 3) {
    op += vector1[c] * vector2[c];
    c++;
  }
  return op;
}


x86 assembly (clang, -O0):
<Vector_Dot_Product>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    115f <Vector_Dot_Product+0x5f>
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
movss  -0x14(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    111b <Vector_Dot_Product+0x1b>
movss  -0x14(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define float @Vector_Dot_Product(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = tail call float @llvm.fmuladd.f32(float %3, float %4, float 0.000000e+00)
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %1, i64 1
%9 = load float, float* %8
%10 = tail call float @llvm.fmuladd.f32(float %7, float %9, float %5)
%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
}
/* Variables and functions */
char getchar();
int clear_s(void) {
  while (getchar() != '\n')
    ;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @clear_s() {
br label %1
1: ; preds = %1, %0
%2 = tail call signext i8 (...) @getchar()
%3 = icmp eq i8 %2, 10
br i1 %3, label %4, label %1
4: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ OPENSSL_strlcpy(char *, char *, size_t);
int strlen(char *);
int test_pem_password_cb(char *buf, int size, int rwflag, void *userdata) {
  OPENSSL_strlcpy(buf, (char *)userdata, (size_t)size);
  return strlen(buf);
}


x86 assembly (clang, -O0):
<test_pem_password_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
movslq -0xc(%rbp),%rdx
call   1030 <OPENSSL_strlcpy@plt>
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_pem_password_cb>:
push   %rbx
mov    %rdi,%rbx
movslq %esi,%rdx
mov    %rcx,%rsi
call   1030 <OPENSSL_strlcpy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <strlen@plt>

LLVM IR (-O0):
define i32 @test_pem_password_cb(i8* %0, i32 %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %8
%11 = load i32, i32* %6
%12 = sext i32 %11 to i64
%13 = call i32 @OPENSSL_strlcpy(i8* %9, i8* %10, i64 %12)
%14 = load i8*, i8** %5
%15 = call i32 @strlen(i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @test_pem_password_cb(i8* %0, i32 %1, i32 %2, i8* %3) {
%5 = sext i32 %1 to i64
%6 = tail call i32 @OPENSSL_strlcpy(i8* %0, i8* %3, i64 %5)
%7 = tail call i32 @strlen(i8* %0)
ret i32 %7
}
void test1() { int num = 5; }


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

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

LLVM IR (-O0):
define void @test1() {
%1 = alloca i32
store i32 5, i32* %1
ret void
}

LLVM IR (-O2):
define void @test1() {
ret void
}
int ascii_toupper(int c) {
  if (c >= 'a' && c <= 'z')
    c &= ~0x20;
  return c;
}


x86 assembly (clang, -O0):
<ascii_toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1124 <ascii_toupper+0x24>
cmpl   $0x7a,-0x4(%rbp)
jg     1124 <ascii_toupper+0x24>
mov    -0x4(%rbp),%eax
and    $0xffffffdf,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascii_toupper>:
lea    -0x61(%rdi),%ecx
mov    %edi,%eax
and    $0xffffffdf,%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @ascii_toupper(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 %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* %2
%10 = and i32 %9, -33
store i32 %10, i32* %2
br label %11
11: ; preds = %8, %5, %1
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @ascii_toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = and i32 %0, -33
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ gc();
int /*<<< orphan*/ save_image(int /*<<< orphan*/);
int /*<<< orphan*/ unbox_char_string();
void primitive_save_image(void) {
  gc();
  save_image(unbox_char_string());
}


x86 assembly (clang, -O0):
<primitive_save_image>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <gc@plt>
mov    $0x0,%al
call   1050 <unbox_char_string@plt>
mov    %eax,%edi
call   1040 <save_image@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_save_image>:
push   %rax
xor    %eax,%eax
call   1030 <gc@plt>
xor    %eax,%eax
call   1050 <unbox_char_string@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <save_image@plt>

LLVM IR (-O0):
define void @primitive_save_image() {
%1 = call i32 (...) @gc()
%2 = call i32 (...) @unbox_char_string()
%3 = call i32 @save_image(i32 %2)
ret void
}

LLVM IR (-O2):
define void @primitive_save_image() {
%1 = tail call i32 (...) @gc()
%2 = tail call i32 (...) @unbox_char_string()
%3 = tail call i32 @save_image(i32 %2)
ret void
}
/* Variables and functions */
double alpha_m(double const);
double beta_m(double const);
double m_inf(const double V_tilde) {
  return alpha_m(V_tilde) / (alpha_m(V_tilde) + beta_m(V_tilde));
}


x86 assembly (clang, -O0):
<m_inf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <alpha_m@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <alpha_m@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <beta_m@plt>
movsd  -0x18(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x10(%rbp),%xmm0
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_inf>:
sub    $0x18,%rsp
movsd  %xmm0,(%rsp)
call   1040 <alpha_m@plt>
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1040 <alpha_m@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1030 <beta_m@plt>
addsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @m_inf(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @alpha_m(double %3)
%5 = load double, double* %2
%6 = call double @alpha_m(double %5)
%7 = load double, double* %2
%8 = call double @beta_m(double %7)
%9 = fadd double %6, %8
%10 = fdiv double %4, %9
ret double %10
}

LLVM IR (-O2):
define double @m_inf(double %0) {
%2 = tail call double @alpha_m(double %0)
%3 = tail call double @alpha_m(double %0)
%4 = tail call double @beta_m(double %0)
%5 = fadd double %3, %4
%6 = fdiv double %2, %5
ret double %6
}
int qh4r(unsigned int x) {
  unsigned int ten = x & 0x40404040;
  x = (x & 0xf0f0f0f) + 9 * (ten >> 6);
  x = (x & 0xf000f00) | ((x & 0xf000f) << 12);
  return (int)((x & 0xff00) | ((x >> 24) & 255));
}


x86 assembly (clang, -O0):
<qh4r>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x40404040,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf0f0f0f,%eax
mov    -0x8(%rbp),%ecx
shr    $0x6,%ecx
imul   $0x9,%ecx,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf000f00,%eax
mov    -0x4(%rbp),%ecx
and    $0xf000f,%ecx
shl    $0xc,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
mov    -0x4(%rbp),%ecx
shr    $0x18,%ecx
and    $0xff,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qh4r>:
mov    %edi,%ecx
and    $0xf0f0f0f,%ecx
shr    $0x6,%edi
and    $0x1010101,%edi
lea    (%rdi,%rdi,8),%eax
add    %ecx,%eax
mov    %eax,%ecx
and    $0xf000f00,%ecx
shl    $0xc,%eax
and    $0xf000f000,%eax
or     %ecx,%eax
movzwl %ax,%ecx
shr    $0x18,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @qh4r(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 1077952576
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = and i32 %6, 252645135
%8 = load i32, i32* %3
%9 = lshr i32 %8, 6
%10 = mul i32 9, %9
%11 = add i32 %7, %10
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = and i32 %12, 251662080
%14 = load i32, i32* %2
%15 = and i32 %14, 983055
%16 = shl i32 %15, 12
%17 = or i32 %13, %16
store i32 %17, i32* %2
%18 = load i32, i32* %2
%19 = and i32 %18, 65280
%20 = load i32, i32* %2
%21 = lshr i32 %20, 24
%22 = and i32 %21, 255
%23 = or i32 %19, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @qh4r(i32 %0) {
%2 = and i32 %0, 252645135
%3 = lshr i32 %0, 6
%4 = and i32 %3, 16843009
%5 = mul nuw nsw i32 %4, 9
%6 = add nuw nsw i32 %5, %2
%7 = and i32 %6, 251662080
%8 = shl i32 %6, 12
%9 = and i32 %8, -268374016
%10 = or i32 %9, %7
%11 = and i32 %10, 65280
%12 = lshr i32 %10, 24
%13 = or i32 %11, %12
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x8e() {
  Assert_real((iscntrl(142) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              715, ("iscntrl should be 0 for 0x8e"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0x8e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8e,%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x2cb,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0x8e>:
push   %rax
mov    $0x8e,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2cb,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x8e\00"
define void @t_iscntrl_0x8e() {
%1 = call i64 @iscntrl(i32 142)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 715, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0x8e\00"
define void @t_iscntrl_0x8e() {
%1 = tail call i64 @iscntrl(i32 142)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 715, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void foo7f() {}


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

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

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

LLVM IR (-O2):
define void @foo7f() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cnfExprt(char *, char *const, int);
int /*<<< orphan*/ datCctyp(int, char *);
void dat_cctyp_(int *const size, char *const type, int type_length) {
  char type_c[15 + 1];
  datCctyp(*size, type_c);
  cnfExprt(type_c, type, type_length);
}


x86 assembly (clang, -O0):
<dat_cctyp_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
lea    -0x30(%rbp),%rsi
call   1040 <datCctyp@plt>
lea    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <cnfExprt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dat_cctyp_>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebp
mov    %rsi,%rbx
mov    (%rdi),%edi
mov    %rsp,%r14
mov    %r14,%rsi
call   1040 <datCctyp@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1030 <cnfExprt@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @dat_cctyp_(i32* %0, i8* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [16 x i8]
store i32* %0, i32** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%11 = call i32 @datCctyp(i32 %9, i8* %10)
%12 = getelementptr inbounds [16 x i8], [16 x i8]* %7, i64 0, i64 0
%13 = load i8*, i8** %5
%14 = load i32, i32* %6
%15 = call i32 @cnfExprt(i8* %12, i8* %13, i32 %14)
ret void
}

LLVM IR (-O2):
define void @dat_cctyp_(i32* nocapture %0, i8* %1, i32 %2) {
%4 = alloca [16 x i8]
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %4, i64 0, i64 0
%6 = load i32, i32* %0
%7 = call i32 @datCctyp(i32 %6, i8* %5)
%8 = call i32 @cnfExprt(i8* %5, i8* %1, i32 %2)
ret void
}
void g_key_file_get_string_list() {}


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

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

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

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