xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ __cpuid_count(int, int /*<<< orphan*/, unsigned int,
                                 unsigned int, unsigned int, unsigned int);
int __get_cpuid_max(int /*<<< orphan*/, int /*<<< orphan*/ *);
int cpu_has_rtm(void) {
  if (__get_cpuid_max(0, NULL) >= 7) {
    unsigned a, b, c, d;
    __cpuid_count(7, 0, a, b, c, d);
    return !!(b & (1 << 11));
  }
  return 0;
}


x86 assembly (clang, -O0):
<cpu_has_rtm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <__get_cpuid_max@plt>
cmp    $0x7,%eax
jl     1175 <cpu_has_rtm+0x55>
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    $0x7,%edi
xor    %esi,%esi
call   1040 <__cpuid_count@plt>
mov    -0xc(%rbp),%eax
and    $0x800,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    117c <cpu_has_rtm+0x5c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cpu_has_rtm>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <__get_cpuid_max@plt>
cmp    $0x7,%eax
jl     113b <cpu_has_rtm+0x1b>
mov    $0x7,%edi
xor    %esi,%esi
call   1040 <__cpuid_count@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cpu_has_rtm() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = call i32 @__get_cpuid_max(i32 0, i32* null)
%7 = icmp sge i32 %6, 7
br i1 %7, label %8, label %20
8: ; preds = %0
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = call i32 @__cpuid_count(i32 7, i32 0, i32 %9, i32 %10, i32 %11, i32 %12)
%14 = load i32, i32* %3
%15 = and i32 %14, 2048
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
store i32 %19, i32* %1
br label %21
20: ; preds = %0
store i32 0, i32* %1
br label %21
21: ; preds = %20, %8
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
define i32 @cpu_has_rtm() {
%1 = tail call i32 @__get_cpuid_max(i32 0, i32* null)
%2 = icmp sgt i32 %1, 6
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @__cpuid_count(i32 7, i32 0, i32 undef, i32 undef, i32 undef, i32 undef)
br label %5
5: ; preds = %0, %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ remove_ac_b(char *);
void main() {
  char str[] = "bbbbd";
  remove_ac_b(str);
  printf("After removal %s", str);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xed2(%rip),%eax
mov    %eax,-0x6(%rbp)
mov    0xecc(%rip),%ax
mov    %ax,-0x2(%rbp)
lea    -0x6(%rbp),%rdi
call   1040 <remove_ac_b@plt>
lea    -0x6(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movw   $0x64,0xc(%rsp)
movl   $0x62626262,0x8(%rsp)
62
lea    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <remove_ac_b@plt>
lea    0xebe(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [6 x i8] c"bbbbd\00"
@.str = [17 x i8] c"After removal %s\00"
define void @main() {
%1 = alloca [6 x i8]
%2 = bitcast [6 x i8]* %1 to i8*
%3 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%4 = call i32 @remove_ac_b(i8* %3)
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@__const.main.str = [6 x i8] c"bbbbd\00"
@.str = [17 x i8] c"After removal %s\00"
define void @main() {
%1 = alloca [6 x i8]
%2 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%3 = call i32 @remove_ac_b(i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
__attribute__((noipa)) unsigned long f2(unsigned long a, unsigned long b) {
  unsigned long i = __builtin_add_overflow(a, b, &a);
  return a - i;
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rcx
add    -0x10(%rbp),%rcx
setb   %al
mov    %rcx,-0x8(%rbp)
and    $0x1,%al
movzbl %al,%eax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
mov    %rdi,%rax
add    %rsi,%rax
sbb    $0x0,%rax
ret

LLVM IR (-O0):
define i64 @f2(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = call { i64, i1 } @llvm.uadd.with.overflow.i64(i64 %6, i64 %7)
%9 = extractvalue { i64, i1 } %8, 1
%10 = extractvalue { i64, i1 } %8, 0
store i64 %10, i64* %3
%11 = zext i1 %9 to i64
store i64 %11, i64* %5
%12 = load i64, i64* %3
%13 = load i64, i64* %5
%14 = sub i64 %12, %13
ret i64 %14
}

LLVM IR (-O2):
define i64 @f2(i64 %0, i64 %1) {
%3 = tail call { i64, i1 } @llvm.uadd.with.overflow.i64(i64 %0, i64 %1)
%4 = extractvalue { i64, i1 } %3, 1
%5 = extractvalue { i64, i1 } %3, 0
%6 = sext i1 %4 to i64
%7 = add i64 %5, %6
ret i64 %7
}
void dd_pbl_ios_gc_scores_retrieve(const char *name) {}


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

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

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

LLVM IR (-O2):
define void @dd_pbl_ios_gc_scores_retrieve(i8* nocapture %0) {
ret void
}
int nextdiv(int n, int m) {
  while (++n <= m) {
    if (m % n == 0)
      return (n);
  }
  return (0);
}


x86 assembly (clang, -O0):
<nextdiv>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmp    -0xc(%rbp),%eax
jg     113c <nextdiv+0x3c>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cmp    $0x0,%edx
jne    1137 <nextdiv+0x37>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1143 <nextdiv+0x43>
jmp    110a <nextdiv+0xa>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextdiv>:
cmp    %edi,%esi
mov    %edi,%ecx
cmovg  %esi,%ecx
nopw   0x0(%rax,%rax,1)
cmp    %edi,%ecx
je     1123 <nextdiv+0x23>
add    $0x1,%edi
mov    %esi,%eax
cltd
idiv   %edi
test   %edx,%edx
jne    1110 <nextdiv+0x10>
mov    %edi,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @nextdiv(i32 %0, i32 %1) {
%3 = call i32 @llvm.smax.i32(i32 %1, i32 %0)
br label %4
4: ; preds = %8, %2
%5 = phi i32 [ %0, %2 ], [ %6, %8 ]
%6 = add i32 %5, 1
%7 = icmp eq i32 %5, %3
br i1 %7, label %11, label %8
8: ; preds = %4
%9 = srem i32 %1, %6
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %8
%12 = phi i32 [ %6, %8 ], [ 0, %4 ]
ret i32 %12
}
/* Variables and functions */
void ft_bzero(void *s, size_t n) {
  unsigned char *tmp;
  size_t i;
  tmp = (unsigned char *)s;
  i = 0;
  while (i < n) {
    tmp[i] = (unsigned char)NULL;
    i++;
  }
}


x86 assembly (clang, -O0):
<ft_bzero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1147 <ft_bzero+0x47>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111c <ft_bzero+0x1c>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_bzero>:
test   %rsi,%rsi
je     1124 <ft_bzero+0x14>
push   %rax
mov    %rsi,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @ft_bzero(i8* nocapture writeonly %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %5, label %4
4: ; preds = %2
br label %5
5: ; preds = %4, %2
ret void
}
float v3dot(const float *v1, const float *v2) {
  return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
}


x86 assembly (clang, -O0):
<v3dot>:
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
pop    %rbp
ret

x86 assembly (clang, -O2):
<v3dot>:
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 @v3dot(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %3
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %4
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = load float*, float** %3
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 1
%16 = load float, float* %15
%17 = fmul float %13, %16
%18 = call float @llvm.fmuladd.f32(float %7, float %10, float %17)
%19 = load float*, float** %3
%20 = getelementptr inbounds float, float* %19, i64 2
%21 = load float, float* %20
%22 = load float*, float** %4
%23 = getelementptr inbounds float, float* %22, i64 2
%24 = load float, float* %23
%25 = call float @llvm.fmuladd.f32(float %21, float %24, float %18)
ret float %25
}

LLVM IR (-O2):
define float @v3dot(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
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xe0() {
  Assert_real((iscntrl(224) == 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",
              1125, ("iscntrl should be 0 for 0xe0"));
}


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

x86 assembly (clang, -O2):
<t_iscntrl_0xe0>:
push   %rax
mov    $0xe0,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x465,%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 0xe0\00"
define void @t_iscntrl_0xe0() {
%1 = call i64 @iscntrl(i32 224)
%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 1125, 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 0xe0\00"
define void @t_iscntrl_0xe0() {
%1 = tail call i64 @iscntrl(i32 224)
%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 1125, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int g3(int a) { return a - 255; }


x86 assembly (clang, -O0):
<g3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g3>:
lea    -0xff(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @g3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 255
ret i32 %4
}

LLVM IR (-O2):
define i32 @g3(i32 %0) {
%2 = add nsw i32 %0, -255
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ GL_BLEND;
int /*<<< orphan*/ GL_ONE_MINUS_SRC_ALPHA;
int /*<<< orphan*/ GL_SRC_ALPHA;
int /*<<< orphan*/ glBlendFunc(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
void bfunc(void) {
  static int state;
  if (state ^= 1) {
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
    glEnable(GL_BLEND);
  } else {
    glDisable(GL_BLEND);
  }
}


x86 assembly (clang, -O0):
<bfunc>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f02(%rip),%eax
xor    $0x1,%eax
mov    %eax,0x2ef9(%rip)
cmp    $0x0,%eax
je     1176 <bfunc+0x46>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
mov    0x2e8c(%rip),%rax
mov    (%rax),%esi
call   1030 <glBlendFunc@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
jmp    1184 <bfunc+0x54>
mov    0x2e63(%rip),%rax
mov    (%rax),%edi
call   1050 <glDisable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bfunc>:
push   %rax
xorl   $0x1,0x2f04(%rip)
je     1160 <bfunc+0x30>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
mov    0x2e9e(%rip),%rax
mov    (%rax),%esi
call   1030 <glBlendFunc@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <glEnable@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1050 <glDisable@plt>

LLVM IR (-O0):
@bfunc.state = internal global i32 0
@GL_SRC_ALPHA = global i32 0
@GL_ONE_MINUS_SRC_ALPHA = global i32 0
@GL_BLEND = global i32 0
define void @bfunc() {
%1 = load i32, i32* @bfunc.state
%2 = xor i32 %1, 1
store i32 %2, i32* @bfunc.state
%3 = icmp ne i32 %2, 0
br i1 %3, label %4, label %10
4: ; preds = %0
%5 = load i32, i32* @GL_SRC_ALPHA
%6 = load i32, i32* @GL_ONE_MINUS_SRC_ALPHA
%7 = call i32 @glBlendFunc(i32 %5, i32 %6)
%8 = load i32, i32* @GL_BLEND
%9 = call i32 @glEnable(i32 %8)
br label %13
10: ; preds = %0
%11 = load i32, i32* @GL_BLEND
%12 = call i32 @glDisable(i32 %11)
br label %13
13: ; preds = %10, %4
ret void
}

LLVM IR (-O2):
@bfunc.state = internal unnamed_addr global i32 0
@GL_SRC_ALPHA = global i32 0
@GL_ONE_MINUS_SRC_ALPHA = global i32 0
@GL_BLEND = global i32 0
define void @bfunc() {
%1 = load i32, i32* @bfunc.state
%2 = xor i32 %1, 1
store i32 %2, i32* @bfunc.state
%3 = icmp eq i32 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %0
%5 = load i32, i32* @GL_SRC_ALPHA
%6 = load i32, i32* @GL_ONE_MINUS_SRC_ALPHA
%7 = tail call i32 @glBlendFunc(i32 %5, i32 %6)
%8 = load i32, i32* @GL_BLEND
%9 = tail call i32 @glEnable(i32 %8)
br label %13
10: ; preds = %0
%11 = load i32, i32* @GL_BLEND
%12 = tail call i32 @glDisable(i32 %11)
br label %13
13: ; preds = %10, %4
ret void
}
const char *GC_Description(void) {
  return "The `GC` type provides an interface to the Cello Garbage Collector. "
         "One "
         "instance of this type is created for each thread and can be "
         "retrieved "
         "using the `current` function. The Garbage Collector can be stopped "
         "and "
         "started using `start` and `stop` and objects can be added or removed "
         "from "
         "the Garbage Collector using `set` and `rem`.";
}


x86 assembly (clang, -O0):
<GC_Description>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<GC_Description>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [332 x i8] c"The `GC` type provides an interface to the Cello Garbage Collector. One instance of this type is created for each thread and can be retrieved using the `current` function. The Garbage Collector can be stopped and started using `start` and `stop` and objects can be added or removed from the Garbage Collector using `set` and `rem`.\00"
define i8* @GC_Description() {
ret i8* getelementptr inbounds ([332 x i8], [332 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [332 x i8] c"The `GC` type provides an interface to the Cello Garbage Collector. One instance of this type is created for each thread and can be retrieved using the `current` function. The Garbage Collector can be stopped and started using `start` and `stop` and objects can be added or removed from the Garbage Collector using `set` and `rem`.\00"
define i8* @GC_Description() {
ret i8* getelementptr inbounds ([332 x i8], [332 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *);
void error_init() { panic("failed to craft first process\n"); }


x86 assembly (clang, -O0):
<error_init>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <panic@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [31 x i8] c"failed to craft first process\0A\00"
define void @error_init() {
%1 = call i32 @panic(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"failed to craft first process\0A\00"
define void @error_init() {
%1 = tail call i32 @panic(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ init_database();
int /*<<< orphan*/ mostrarTabelas();
int /*<<< orphan*/ verificaArquivos();
int main() {
  int escolha;
  init_database();
  mostrarTabelas();
  verificaArquivos();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <init_database@plt>
mov    $0x0,%al
call   1050 <mostrarTabelas@plt>
mov    $0x0,%al
call   1030 <verificaArquivos@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <init_database@plt>
xor    %eax,%eax
call   1050 <mostrarTabelas@plt>
xor    %eax,%eax
call   1030 <verificaArquivos@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (...) @init_database()
%4 = call i32 (...) @mostrarTabelas()
%5 = call i32 (...) @verificaArquivos()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @init_database()
%2 = tail call i32 (...) @mostrarTabelas()
%3 = tail call i32 (...) @verificaArquivos()
ret i32 0
}
double calculoC(double raizA, double raizB) { return (raizA + raizB) / 2; }


x86 assembly (clang, -O0):
<calculoC>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xee0(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculoC>:
addsd  %xmm1,%xmm0
mulsd  0xef4(%rip),%xmm0
ret

LLVM IR (-O0):
define double @calculoC(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fadd double %5, %6
%8 = fdiv double %7, 2.000000e+00
ret double %8
}

LLVM IR (-O2):
define double @calculoC(double %0, double %1) {
%3 = fadd double %0, %1
%4 = fmul double %3, 5.000000e-01
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ sum(int, int, int);
int main() {
  int num1, num2, num3;
  printf("Please input integers: \n");
  scanf("%d", &num1);
  scanf("%d", &num2);
  scanf("%d", &num3);
  sum(num1, num2, num3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xeb7(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xea7(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <sum@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec7(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
mov    0x4(%rsp),%edx
call   1040 <sum@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Please input integers: \0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = call i32 @sum(i32 %9, i32 %10, i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [24 x i8] c"Please input integers: \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%11 = load i32, i32* %1
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = call i32 @sum(i32 %11, i32 %12, i32 %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ error_handler(char *);
void get_double_data(const char *file, const char *name, double *data) {
  int ncid, varid, status;
  char msg[512];
  error_handler("read_mosaic: Add flag -Duse_netCDF when compiling");
}


x86 assembly (clang, -O0):
<get_double_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x230,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <error_handler@plt>
add    $0x230,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [50 x i8] c"read_mosaic: Add flag -Duse_netCDF when compiling\00"
define void @get_double_data(i8* %0, i8* %1, double* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca [512 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store double* %2, double** %6
%11 = call i32 @error_handler(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [50 x i8] c"read_mosaic: Add flag -Duse_netCDF when compiling\00"
define void @get_double_data(i8* nocapture readnone %0, i8* nocapture readnone %1, double* nocapture readnone %2) {
%4 = tail call i32 @error_handler(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
ret void
}
void av_encryption_info_alloc() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @console_init() {
ret void
}
unsigned long djb2_hash(char *str) {
  unsigned long hash = 5381;
  char c;
  while (c = *str++)
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<djb2_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
cmp    $0x0,%al
je     1149 <djb2_hash+0x49>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movsbq -0x11(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <djb2_hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<djb2_hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <djb2_hash+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <djb2_hash+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @djb2_hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Variables and functions */
int *f();
int /*<<< orphan*/ free(int *);
int *malloc(int);
int main(int argc, char *argv[]) {
  int *p = malloc(100);
  *p = 1;
  p = f();
  free(p);
  return p == 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x64,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
mov    $0x0,%al
call   1040 <f@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
cmpq   $0x0,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x64,%edi
call   1050 <malloc@plt>
xor    %eax,%eax
call   1040 <f@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <free@plt>
xor    %eax,%eax
test   %rbx,%rbx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32* @malloc(i32 100)
store i32* %7, i32** %6
%8 = load i32*, i32** %6
store i32 1, i32* %8
%9 = call i32* (...) @f()
store i32* %9, i32** %6
%10 = load i32*, i32** %6
%11 = call i32 @free(i32* %10)
%12 = load i32*, i32** %6
%13 = icmp eq i32* %12, null
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32* @malloc(i32 100)
%4 = tail call i32* (...) @f()
%5 = tail call i32 @free(i32* %4)
%6 = icmp eq i32* %4, null
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_hashmap();
int main(int argc, char **argv) {
  test_hashmap();
  printf("All hashmap tests PASSED\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <test_hashmap@plt>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test_hashmap@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [25 x i8] c"All hashmap tests PASSED\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test_hashmap()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int bad(int i) { return i == 0; }


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

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

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

LLVM IR (-O2):
define i32 @bad(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char s[256];
  scanf("%s", s);
  printf("0\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x110(%rbp),%rsi
lea    0xec0(%rip),%rdi
call   1040 <scanf@plt>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x108,%rsp
lea    0xed2(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x108,%rsp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@str = [2 x i8] c"0\00"
define i32 @main() {
%1 = alloca [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}
unsigned long hash_sdbm(const char *str) {
  unsigned long hash = 0;
  const char *p = str;
  while (*p != '\0')
    hash = (*p++) + (hash << 6) + (hash << 16) - hash;
  return hash;
}


x86 assembly (clang, -O0):
<hash_sdbm>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115e <hash_sdbm+0x5e>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbq (%rax),%rax
mov    -0x10(%rbp),%rcx
shl    $0x6,%rcx
add    %rcx,%rax
mov    -0x10(%rbp),%rcx
shl    $0x10,%rcx
add    %rcx,%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1118 <hash_sdbm+0x18>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_sdbm>:
mov    (%rdi),%cl
test   %cl,%cl
je     112a <hash_sdbm+0x2a>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbq %cl,%rcx
imul   $0x1003f,%rax,%rax
add    %rcx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_sdbm+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @hash_sdbm(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 0, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = sext i8 %5 to i64
%10 = mul i64 %7, 65599
%11 = add i64 %10, %9
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 0, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, int, char);
int fun_call_align_3(char a, int b, char c) {
  printf("a = %d, b = %d, c = %d\n", a, b, c);
  return a + b + c;
}


x86 assembly (clang, -O0):
<fun_call_align_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x1(%rbp),%al
mov    -0x8(%rbp),%edx
lea    0xecd(%rip),%rdi
movsbl %al,%esi
movsbl -0x9(%rbp),%ecx
call   1030 <printf@plt>
movsbl -0x1(%rbp),%eax
add    -0x8(%rbp),%eax
movsbl -0x9(%rbp),%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_call_align_3>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xede(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1030 <printf@plt>
add    %ebp,%ebx
add    %r14d,%ebx
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [24 x i8] c"a = %d, b = %d, c = %d\0A\00"
define i32 @fun_call_align_3(i8 signext %0, i32 %1, i8 signext %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i8
store i8 %0, i8* %4
store i32 %1, i32* %5
store i8 %2, i8* %6
%7 = load i8, i8* %4
%8 = load i32, i32* %5
%9 = load i8, i8* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 signext %7, i32 %8, i8 signext %9)
%11 = load i8, i8* %4
%12 = sext i8 %11 to i32
%13 = load i32, i32* %5
%14 = add nsw i32 %12, %13
%15 = load i8, i8* %6
%16 = sext i8 %15 to i32
%17 = add nsw i32 %14, %16
ret i32 %17
}

LLVM IR (-O2):
@.str = [24 x i8] c"a = %d, b = %d, c = %d\0A\00"
define i32 @fun_call_align_3(i8 signext %0, i32 %1, i8 signext %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8 signext %0, i32 %1, i8 signext %2)
%5 = sext i8 %0 to i32
%6 = add nsw i32 %5, %1
%7 = sext i8 %2 to i32
%8 = add nsw i32 %6, %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ atol(char *);
int bench_time(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  if (argc == 1 + 1) {
    return -bench_time(atol(argv[1]));
  } else {
    printf("USAGE : bench_time count\n");
    return 7;
  }
}


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   $0x2,-0x8(%rbp)
jne    1172 <main+0x42>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atol@plt>
mov    %eax,%edi
call   1050 <bench_time@plt>
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1185 <main+0x55>
lea    0xe87(%rip),%rdi
call   1030 <printf@plt>
movl   $0x7,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x2,%edi
jne    114a <main+0x1a>
mov    0x8(%rsi),%rdi
call   1040 <atol@plt>
mov    %eax,%edi
call   1050 <bench_time@plt>
neg    %eax
pop    %rcx
ret
lea    0xeaf(%rip),%rdi
call   1030 <puts@plt>
mov    $0x7,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"USAGE : bench_time count\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %15
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atol(i8* %11)
%13 = call i32 @bench_time(i32 %12)
%14 = sub nsw i32 0, %13
store i32 %14, i32* %3
br label %17
15: ; preds = %2
%16 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
store i32 7, i32* %3
br label %17
17: ; preds = %15, %8
%18 = load i32, i32* %3
ret i32 %18
}

LLVM IR (-O2):
@str = [25 x i8] c"USAGE : bench_time count\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atol(i8* %6)
%8 = tail call i32 @bench_time(i32 %7)
%9 = sub nsw i32 0, %8
br label %12
10: ; preds = %2
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
br label %12
12: ; preds = %10, %4
%13 = phi i32 [ %9, %4 ], [ 7, %10 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ cwk_path_is_separator(char const *);
const char *cwk_path_find_next_stop(const char *c) {
  while (*c != '\0' && !cwk_path_is_separator(c)) {
    ++c;
  }
  return c;
}


x86 assembly (clang, -O0):
<cwk_path_find_next_stop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1145 <cwk_path_find_next_stop+0x35>
mov    -0x8(%rbp),%rdi
call   1030 <cwk_path_is_separator@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1155 <cwk_path_find_next_stop+0x45>
jmp    1166 <cwk_path_find_next_stop+0x56>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <cwk_path_find_next_stop+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cwk_path_find_next_stop>:
push   %rbx
mov    %rdi,%rbx
cmpb   $0x0,(%rdi)
je     113b <cwk_path_find_next_stop+0x2b>
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <cwk_path_is_separator@plt>
test   %eax,%eax
jne    113b <cwk_path_find_next_stop+0x2b>
lea    0x1(%rbx),%rax
cmpb   $0x0,0x1(%rbx)
mov    %rax,%rbx
jne    1120 <cwk_path_find_next_stop+0x10>
pop    %rbx
ret
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @cwk_path_find_next_stop(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = call i32 @cwk_path_is_separator(i8* %9)
%11 = icmp ne i32 %10, 0
%12 = xor i1 %11, true
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @cwk_path_find_next_stop(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %8
%5 = phi i8* [ %9, %8 ], [ %0, %1 ]
%6 = tail call i32 @cwk_path_is_separator(i8* %5)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %5, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %8, %1
%13 = phi i8* [ %0, %1 ], [ %9, %8 ], [ %5, %4 ]
ret i8* %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ pthread_exit(int /*<<< orphan*/ *);
int /*<<< orphan*/ sleep(int);
void *thread_func(void *arg) {
  int *t = (int *)arg;
  printf("Thread0, arg = %d\n", *t);
  sleep(5);
  pthread_exit(NULL);
}


x86 assembly (clang, -O0):
<thread_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%edi
call   1050 <sleep@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1040 <pthread_exit@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_func>:
push   %rax
mov    (%rdi),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x5,%edi
call   1050 <sleep@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <pthread_exit@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"Thread0, arg = %d\0A\00"
define i8* @thread_func(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = call i32 @sleep(i32 5)
%11 = call i32 @pthread_exit(i32* null)
%12 = load i8*, i8** %2
ret i8* %12
}

LLVM IR (-O2):
@.str = [19 x i8] c"Thread0, arg = %d\0A\00"
define noalias i8* @thread_func(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @sleep(i32 5)
%6 = tail call i32 @pthread_exit(i32* null)
ret i8* undef
}
unsigned xrop3_26_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = S & T;
  stk2 = D | stk3;
  stk1 = T ^ stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_26_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_26_0_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
mov    %esi,%eax
shl    $0x8,%eax
lea    (%rax,%rsi,1),%edx
and    %ecx,%eax
or     %edi,%ecx
or     $0xff,%eax
xor    %edx,%eax
and    %ecx,%eax
not    %edi
and    %esi,%edi
xor    $0xff,%esi
or     %edi,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_26_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = and i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %5
%27 = load i32, i32* %10
%28 = or i32 %26, %27
store i32 %28, i32* %9
%29 = load i32, i32* %7
%30 = load i32, i32* %9
%31 = xor i32 %29, %30
store i32 %31, i32* %8
%32 = load i32, i32* %8
%33 = load i32, i32* %6
%34 = and i32 %32, %33
%35 = load i32, i32* %8
%36 = load i32, i32* %7
%37 = xor i32 %36, -1
%38 = and i32 %35, %37
%39 = or i32 %34, %38
%40 = load i32, i32* %7
%41 = load i32, i32* %6
%42 = xor i32 %41, -1
%43 = and i32 %40, %42
%44 = load i32, i32* %5
%45 = and i32 %43, %44
%46 = or i32 %39, %45
ret i32 %46
}

LLVM IR (-O2):
define i32 @xrop3_26_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = or i32 %4, %3
%6 = zext i8 %1 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %6
%9 = and i32 %7, %4
%10 = or i32 %9, 255
%11 = xor i32 %10, %8
%12 = and i32 %11, %5
%13 = xor i32 %6, 255
%14 = xor i32 %3, -1
%15 = and i32 %14, %6
%16 = or i32 %15, %13
%17 = or i32 %16, %12
ret i32 %17
}