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

/* Variables and functions */
void **ghash_find(struct ghash *, void const *);
void *ghash_get(struct ghash *d, const void *key) {
  void **entry;
  if ((entry = ghash_find(d, key)) == 0)
    return 0;
  return *entry;
}


x86 assembly (clang, -O0):
<ghash_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <ghash_find@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1148 <ghash_get+0x38>
movq   $0x0,-0x8(%rbp)
jmp    1153 <ghash_get+0x43>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ghash_get>:
push   %rax
call   1030 <ghash_find@plt>
test   %rax,%rax
je     1120 <ghash_get+0x10>
mov    (%rax),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.ghash = type { i32 }
define i8* @ghash_get(%struct.ghash* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca %struct.ghash*
%5 = alloca i8*
%6 = alloca i8**
store %struct.ghash* %0, %struct.ghash** %4
store i8* %1, i8** %5
%7 = load %struct.ghash*, %struct.ghash** %4
%8 = load i8*, i8** %5
%9 = call i8** @ghash_find(%struct.ghash* %7, i8* %8)
store i8** %9, i8*** %6
%10 = icmp eq i8** %9, null
br i1 %10, label %11, label %12
11: ; preds = %2
store i8* null, i8** %3
br label %15
12: ; preds = %2
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
store i8* %14, i8** %3
br label %15
15: ; preds = %12, %11
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
%struct.ghash = type { i32 }
define i8* @ghash_get(%struct.ghash* %0, i8* %1) {
%3 = tail call i8** @ghash_find(%struct.ghash* %0, i8* %1)
%4 = icmp eq i8** %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = load i8*, i8** %3
br label %7
7: ; preds = %2, %5
%8 = phi i8* [ %6, %5 ], [ null, %2 ]
ret i8* %8
}
/* Type definitions */
struct MemoryPage {
  int dummy;
};

/* Variables and functions */
int _AllocMemoryQuarterTrieTreeLeaf(struct MemoryPage *, char *, void *,
                                    unsigned long, int /*<<< orphan*/);
int MAAddMemoryQuarterTrieTreeLeaf(struct MemoryPage *p_mempage, char *key,
                                   void *value, unsigned long value_size) {
  return _AllocMemoryQuarterTrieTreeLeaf(p_mempage, key, value, value_size, 0);
}


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

x86 assembly (clang, -O2):
<MAAddMemoryQuarterTrieTreeLeaf>:
xor    %r8d,%r8d
jmp    1030 <_AllocMemoryQuarterTrieTreeLeaf@plt>

LLVM IR (-O0):
%struct.MemoryPage = type { i32 }
define i32 @MAAddMemoryQuarterTrieTreeLeaf(%struct.MemoryPage* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca %struct.MemoryPage*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
store %struct.MemoryPage* %0, %struct.MemoryPage** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load %struct.MemoryPage*, %struct.MemoryPage** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i64, i64* %8
%13 = call i32 @_AllocMemoryQuarterTrieTreeLeaf(%struct.MemoryPage* %9, i8* %10, i8* %11, i64 %12, i32 0)
ret i32 %13
}

LLVM IR (-O2):
%struct.MemoryPage = type { i32 }
define i32 @MAAddMemoryQuarterTrieTreeLeaf(%struct.MemoryPage* %0, i8* %1, i8* %2, i64 %3) {
%5 = tail call i32 @_AllocMemoryQuarterTrieTreeLeaf(%struct.MemoryPage* %0, i8* %1, i8* %2, i64 %3, i32 0)
ret i32 %5
}
void XcmsRGBiToRGB() {}


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

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

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

LLVM IR (-O2):
define void @XcmsRGBiToRGB() {
ret void
}
int feclearexcept(int excepts) {
  if (excepts == 0)
    return 0;
  return -1;
}


x86 assembly (clang, -O0):
<feclearexcept>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <feclearexcept+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    1124 <feclearexcept+0x24>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<feclearexcept>:
neg    %edi
sbb    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @feclearexcept(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = sext i1 %2 to i32
ret i32 %3
}
long int parent(struct Node *heap, long int index, int *currentSize) {
  return (long int)(index / 2);
}


x86 assembly (clang, -O0):
<parent>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
pop    %rbp
ret

x86 assembly (clang, -O2):
<parent>:
mov    %rsi,%rax
shr    $0x3f,%rax
add    %rsi,%rax
sar    %rax
ret

LLVM IR (-O0):
%struct.Node = type opaque
define i64 @parent(%struct.Node* %0, i64 %1, i32* %2) {
%4 = alloca %struct.Node*
%5 = alloca i64
%6 = alloca i32*
store %struct.Node* %0, %struct.Node** %4
store i64 %1, i64* %5
store i32* %2, i32** %6
%7 = load i64, i64* %5
%8 = sdiv i64 %7, 2
ret i64 %8
}

LLVM IR (-O2):
%struct.Node = type opaque
define i64 @parent(%struct.Node* nocapture readnone %0, i64 %1, i32* nocapture readnone %2) {
%4 = sdiv i64 %1, 2
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ LDI(int, int);
int /*<<< orphan*/ T_WAIT_UNTIL(int);
void op_ED_0xa0(void) {
  LDI(4, 7);
  T_WAIT_UNTIL(12);
  return;
}


x86 assembly (clang, -O0):
<op_ED_0xa0>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
mov    $0x7,%esi
call   1040 <LDI@plt>
mov    $0xc,%edi
call   1030 <T_WAIT_UNTIL@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_ED_0xa0>:
push   %rax
mov    $0x4,%edi
mov    $0x7,%esi
call   1040 <LDI@plt>
mov    $0xc,%edi
pop    %rax
jmp    1030 <T_WAIT_UNTIL@plt>

LLVM IR (-O0):
define void @op_ED_0xa0() {
%1 = call i32 @LDI(i32 4, i32 7)
%2 = call i32 @T_WAIT_UNTIL(i32 12)
ret void
}

LLVM IR (-O2):
define void @op_ED_0xa0() {
%1 = tail call i32 @LDI(i32 4, i32 7)
%2 = tail call i32 @T_WAIT_UNTIL(i32 12)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void timer_stop(uint32_t *timer) { timer[0x00C / 4] &= ~((uint32_t)1); }


x86 assembly (clang, -O0):
<timer_stop>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
and    $0xfffffffe,%ecx
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_stop>:
andb   $0xfe,0xc(%rdi)
ret

LLVM IR (-O0):
define void @timer_stop(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 3
%5 = load i32, i32* %4
%6 = and i32 %5, -2
store i32 %6, i32* %4
ret void
}

LLVM IR (-O2):
define void @timer_stop(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
%4 = and i32 %3, -2
store i32 %4, i32* %2
ret void
}
/* Variables and functions */
scalar_t__ bmemdup(char const *, size_t);
char *bstrdup_n(const char *str, size_t n) {
  char *dup;
  if (!str || !*str)
    return NULL;
  dup = (char *)bmemdup(str, n + 1);
  dup[n] = 0;
  return dup;
}


x86 assembly (clang, -O0):
<bstrdup_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1138 <bstrdup_n+0x28>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1145 <bstrdup_n+0x35>
movq   $0x0,-0x8(%rbp)
jmp    116e <bstrdup_n+0x5e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
add    $0x1,%rsi
call   1030 <bmemdup@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bstrdup_n>:
push   %rbx
test   %rdi,%rdi
je     112d <bstrdup_n+0x1d>
cmpb   $0x0,(%rdi)
je     112d <bstrdup_n+0x1d>
mov    %rsi,%rbx
add    $0x1,%rsi
call   1030 <bmemdup@plt>
movb   $0x0,(%rax,%rbx,1)
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @bstrdup_n(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %4
%8 = add i64 %1, 1
%9 = tail call i64 @bmemdup(i8* %0, i64 %8)
%10 = inttoptr i64 %9 to i8*
%11 = getelementptr inbounds i8, i8* %10, i64 %1
store i8 0, i8* %11
br label %12
12: ; preds = %2, %4, %7
%13 = phi i8* [ %10, %7 ], [ null, %4 ], [ null, %2 ]
ret i8* %13
}
/* Variables and functions */
int floor(double);
double yuzluk_tam_sayiya_yuvarla(double girilen_sayi) {
  double yuvarlanan_sayi;
  yuvarlanan_sayi = floor((girilen_sayi * 100) + .5) / 100;
  return yuvarlanan_sayi;
}


x86 assembly (clang, -O0):
<yuzluk_tam_sayiya_yuvarla>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed2(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1030 <floor@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yuzluk_tam_sayiya_yuvarla>:
push   %rax
mulsd  0xee7(%rip),%xmm0
addsd  0xee7(%rip),%xmm0
call   1030 <floor@plt>
cltq
imul   $0x51eb851f,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x25,%rax
add    %ecx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @yuzluk_tam_sayiya_yuvarla(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @llvm.fmuladd.f64(double %4, double 1.000000e+02, double 5.000000e-01)
%6 = call i32 @floor(double %5)
%7 = sdiv i32 %6, 100
%8 = sitofp i32 %7 to double
store double %8, double* %3
%9 = load double, double* %3
ret double %9
}

LLVM IR (-O2):
define double @yuzluk_tam_sayiya_yuvarla(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 1.000000e+02, double 5.000000e-01)
%3 = tail call i32 @floor(double %2)
%4 = sdiv i32 %3, 100
%5 = sitofp i32 %4 to double
ret double %5
}
int write(int fd, char *buf, int nbytes) { return 0; }


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @write(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret i32 0
}

LLVM IR (-O2):
define i32 @write(i32 %0, i8* nocapture readnone %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char **argv) {
  int pid;
  pid = getpid();
  printf("this process has id %d\n", pid);
  return 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    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [24 x i8] c"this process has id %d\0A\00"
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 (...) @getpid()
store i32 %7, i32* %6
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"this process has id %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getpid()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
void pmksa_cache_notify_reconfig(struct rsn_pmksa_cache *pmksa) {}


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

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

LLVM IR (-O0):
%struct.rsn_pmksa_cache = type opaque
define void @pmksa_cache_notify_reconfig(%struct.rsn_pmksa_cache* %0) {
%2 = alloca %struct.rsn_pmksa_cache*
store %struct.rsn_pmksa_cache* %0, %struct.rsn_pmksa_cache** %2
ret void
}

LLVM IR (-O2):
%struct.rsn_pmksa_cache = type opaque
define void @pmksa_cache_notify_reconfig(%struct.rsn_pmksa_cache* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ StubBug(char *);
int ffsll(long long int i) {
  StubBug("STUB:"
          "ffsll");
  return -1;
}


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

x86 assembly (clang, -O2):
<ffsll>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <StubBug@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"STUB:ffsll\00"
define i32 @ffsll(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @StubBug(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [11 x i8] c"STUB:ffsll\00"
define i32 @ffsll(i64 %0) {
%2 = tail call i32 @StubBug(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
int getIdx(char s) { return s; }


x86 assembly (clang, -O0):
<getIdx>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @getIdx(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @getIdx(i8 signext %0) {
%2 = sext i8 %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x8b() {
  Assert_real((islower(139) == 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_islower.c",
              700, ("islower should be 0 for 0x8b"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x8b>:
push   %rax
mov    $0x8b,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2bc,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x8b\00"
define void @t_islower_0x8b() {
%1 = call i64 @islower(i32 139)
%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 700, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x8b\00"
define void @t_islower_0x8b() {
%1 = tail call i64 @islower(i32 139)
%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 700, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int recSum(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int term = 0;
  printf("For how many consecutive natural numbers would you like to calculate "
         "the sum?\n");
  scanf("%d", &term);
  printf("The sum is %d.\n", recSum(term));
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
lea    0xea4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
call   1050 <recSum@plt>
lea    0xe8d(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [79 x i8] c"For how many consecutive natural numbers would you like to calculate the sum?\0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [16 x i8] c"The sum is %d.\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @recSum(i32 %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [16 x i8] c"The sum is %d.\0A\00"
@str = [78 x i8] c"For how many consecutive natural numbers would you like to calculate the sum?\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @recSum(i32 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void putchar(uint8_t c) {
  uint32_t a3;
  volatile uint32_t *tx_reg = (uint32_t *)((1 << 11) + 4);
  a3 = 1 | (c << 8);
  *tx_reg = a3;
  a3 = c << 8;
  *tx_reg = a3;
  while (*((uint8_t *)tx_reg) == 0) {
  }
}


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x804,%eax
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
or     $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jne    1149 <putchar+0x49>
jmp    1137 <putchar+0x37>
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
shl    $0x8,%edi
lea    0x1(%rdi),%eax
mov    %eax,0x804
mov    %edi,0x804
test   %edi,%edi
je     1120 <putchar+0x20>
ret
nopl   0x0(%rax)
jmp    1120 <putchar+0x20>

LLVM IR (-O0):
define void @putchar(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %2
store i32* inttoptr (i64 2052 to i32*), i32** %4
%5 = load i32, i32* %2
%6 = shl i32 %5, 8
%7 = or i32 1, %6
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = load i32*, i32** %4
store volatile i32 %8, i32* %9
%10 = load i32, i32* %2
%11 = shl i32 %10, 8
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = load i32*, i32** %4
store volatile i32 %12, i32* %13
br label %14
14: ; preds = %18, %1
%15 = load i32*, i32** %4
%16 = load i32, i32* %15
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %19
18: ; preds = %14
br label %14
19: ; preds = %14
ret void
}

LLVM IR (-O2):
define void @putchar(i32 %0) {
%2 = shl i32 %0, 8
%3 = or i32 %2, 1
store volatile i32 %3, i32* inttoptr (i64 2052 to i32*)
store volatile i32 %2, i32* inttoptr (i64 2052 to i32*)
%4 = icmp eq i32 %2, 0
br i1 %4, label %5, label %6
5: ; preds = %1, %5
br label %5
6: ; preds = %1
ret void
}
int pointer1(int *p) { return *p; }


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

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

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

LLVM IR (-O2):
define i32 @pointer1(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
unsigned short int f78(unsigned short int x, long int y) {
  return (x << y) + (x >> (8 * sizeof(unsigned short) - y));
}


x86 assembly (clang, -O0):
<f78>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
mov    -0x10(%rbp),%rcx
shl    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    $0x10,%ecx
sub    -0x10(%rbp),%rcx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f78>:
mov    %rsi,%rcx
mov    %edi,%eax
shl    %cl,%eax
mov    $0x10,%dl
sub    %cl,%dl
mov    %edx,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f78(i16 zeroext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i64, i64* %4
%8 = trunc i64 %7 to i32
%9 = shl i32 %6, %8
%10 = load i16, i16* %3
%11 = zext i16 %10 to i32
%12 = load i64, i64* %4
%13 = sub i64 16, %12
%14 = trunc i64 %13 to i32
%15 = ashr i32 %11, %14
%16 = add nsw i32 %9, %15
%17 = trunc i32 %16 to i16
ret i16 %17
}

LLVM IR (-O2):
define zeroext i16 @f78(i16 zeroext %0, i64 %1) {
%3 = zext i16 %0 to i32
%4 = trunc i64 %1 to i32
%5 = shl i32 %3, %4
%6 = sub i32 16, %4
%7 = lshr i32 %3, %6
%8 = add nsw i32 %7, %5
%9 = trunc i32 %8 to i16
ret i16 %9
}
/* Type definitions */
struct mat3 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mat3_transpose(float *, float *);
__attribute__((always_)) struct mat3 *psmat3_transpose(struct mat3 *result,
                                                       struct mat3 *m) {
  mat3_transpose((float *)result, (float *)m);
  return result;
}


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

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

LLVM IR (-O0):
%struct.mat3 = type { i32 }
define %struct.mat3* @psmat3_transpose(%struct.mat3* %0, %struct.mat3* %1) {
%3 = alloca %struct.mat3*
%4 = alloca %struct.mat3*
store %struct.mat3* %0, %struct.mat3** %3
store %struct.mat3* %1, %struct.mat3** %4
%5 = load %struct.mat3*, %struct.mat3** %3
%6 = bitcast %struct.mat3* %5 to float*
%7 = load %struct.mat3*, %struct.mat3** %4
%8 = bitcast %struct.mat3* %7 to float*
%9 = call i32 @mat3_transpose(float* %6, float* %8)
%10 = load %struct.mat3*, %struct.mat3** %3
ret %struct.mat3* %10
}

LLVM IR (-O2):
%struct.mat3 = type { i32 }
define %struct.mat3* @psmat3_transpose(%struct.mat3* returned %0, %struct.mat3* %1) {
%3 = bitcast %struct.mat3* %0 to float*
%4 = bitcast %struct.mat3* %1 to float*
%5 = tail call i32 @mat3_transpose(float* %3, float* %4)
ret %struct.mat3* %0
}
void flub_grab_compact(struct flub *flub) { return; }


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

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

LLVM IR (-O0):
%struct.flub = type opaque
define void @flub_grab_compact(%struct.flub* %0) {
%2 = alloca %struct.flub*
store %struct.flub* %0, %struct.flub** %2
ret void
}

LLVM IR (-O2):
%struct.flub = type opaque
define void @flub_grab_compact(%struct.flub* nocapture %0) {
ret void
}
void Memory_SetNegativeDirection() { asm("std\n\t"); }


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

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

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

LLVM IR (-O2):
define void @Memory_SetNegativeDirection() {
tail call void asm sideeffect "std\0A\09", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int rand();
bool random_if(int p) {
  int r = rand() % 100;
  return (r < p);
}


x86 assembly (clang, -O0):
<random_if>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_if>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
movslq %eax,%rcx
imul   $0x51eb851f,%rcx,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x25,%rax
add    %edx,%eax
imul   $0x64,%eax,%eax
sub    %eax,%ecx
xor    %eax,%eax
cmp    %ebx,%ecx
setl   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @random_if(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 (...) @rand()
%5 = srem i32 %4, 100
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %2
%8 = icmp slt i32 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @random_if(i32 %0) {
%2 = tail call i32 (...) @rand()
%3 = srem i32 %2, 100
%4 = icmp slt i32 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
void ssd_cmd(const unsigned char k[1], unsigned data_len) {
  lcd_cmd_fast(*k);
  k++;
  while (data_len) {
    lcd_wr8_fast(*k);
    k++;
    data_len--;
  }
}


x86 assembly (clang, -O0):
<ssd_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
mov    $0x0,%al
call   1040 <lcd_cmd_fast@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     117b <ssd_cmd+0x5b>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
mov    $0x0,%al
call   1030 <lcd_wr8_fast@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1149 <ssd_cmd+0x29>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssd_cmd>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
movzbl (%rdi),%edi
xor    %eax,%eax
call   1040 <lcd_cmd_fast@plt>
test   %ebp,%ebp
je     1155 <ssd_cmd+0x35>
mov    %ebp,%ebp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movzbl 0x1(%r14,%rbx,1),%edi
xor    %eax,%eax
call   1030 <lcd_wr8_fast@plt>
add    $0x1,%rbx
cmp    %ebx,%ebp
jne    1140 <ssd_cmd+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @ssd_cmd(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i8, i8* %5
%7 = zext i8 %6 to i32
%8 = call i32 (i32, ...) bitcast (i32 (...)* @lcd_cmd_fast to i32 (i32, ...)*)(i32 %7)
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %3
br label %11
11: ; preds = %14, %2
%12 = load i32, i32* %4
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %23
14: ; preds = %11
%15 = load i8*, i8** %3
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = call i32 (i32, ...) bitcast (i32 (...)* @lcd_wr8_fast to i32 (i32, ...)*)(i32 %17)
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
%21 = load i32, i32* %4
%22 = add i32 %21, -1
store i32 %22, i32* %4
br label %11
23: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @ssd_cmd(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @lcd_cmd_fast to i32 (i32, ...)*)(i32 %4)
%6 = icmp eq i32 %1, 0
br i1 %6, label %16, label %7
7: ; preds = %2, %7
%8 = phi i8* [ %10, %7 ], [ %0, %2 ]
%9 = phi i32 [ %14, %7 ], [ %1, %2 ]
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @lcd_wr8_fast to i32 (i32, ...)*)(i32 %12)
%14 = add i32 %9, -1
%15 = icmp eq i32 %14, 0
br i1 %15, label %16, label %7
16: ; preds = %7, %2
ret void
}
/* Type definitions */
struct lms_parser_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_parser(char const *, struct lms_parser_info const *);
int list_by_category(void *data, const char *path,
                     const struct lms_parser_info *info) {
  print_parser(path, info);
  return 1;
}


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

x86 assembly (clang, -O2):
<list_by_category>:
push   %rax
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <print_parser@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.lms_parser_info = type { i32 }
define i32 @list_by_category(i8* %0, i8* %1, %struct.lms_parser_info* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.lms_parser_info*
store i8* %0, i8** %4
store i8* %1, i8** %5
store %struct.lms_parser_info* %2, %struct.lms_parser_info** %6
%7 = load i8*, i8** %5
%8 = load %struct.lms_parser_info*, %struct.lms_parser_info** %6
%9 = call i32 @print_parser(i8* %7, %struct.lms_parser_info* %8)
ret i32 1
}

LLVM IR (-O2):
%struct.lms_parser_info = type { i32 }
define i32 @list_by_category(i8* nocapture readnone %0, i8* %1, %struct.lms_parser_info* %2) {
%4 = tail call i32 @print_parser(i8* %1, %struct.lms_parser_info* %2)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ ceilf(float);
long iRound(int /*<<< orphan*/);
long int iCeil(float f) { return iRound(ceilf(f)); }


x86 assembly (clang, -O0):
<iCeil>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <ceilf@plt>
mov    %eax,%edi
call   1030 <iRound@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iCeil>:
push   %rax
call   1040 <ceilf@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <iRound@plt>

LLVM IR (-O0):
define i64 @iCeil(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @ceilf(float %3)
%5 = call i64 @iRound(i32 %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @iCeil(float %0) {
%2 = tail call i32 @ceilf(float %0)
%3 = tail call i64 @iRound(i32 %2)
ret i64 %3
}
void testfunc10(int **(**p5)(int **, int **), int **(**p6)(int **, int ***)) {}


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

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

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

LLVM IR (-O2):
define void @testfunc10(i32** (i32**, i32**)** nocapture %0, i32** (i32**, i32***)** nocapture %1) {
ret void
}
int def_farray_comp(val1, val2)
double *val1, *val2;
{ return (int)(*val1 - *val2); }


x86 assembly (clang, -O0):
<def_farray_comp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
subsd  (%rax),%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<def_farray_comp>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @def_farray_comp(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* %5
%7 = load double*, double** %4
%8 = load double, double* %7
%9 = fsub double %6, %8
%10 = fptosi double %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @def_farray_comp(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fsub double %3, %4
%6 = fptosi double %5 to i32
ret i32 %6
}
/* Variables and functions */
double exp(double);
double ln(double);
double pow(double m, double n) { return exp(n * ln(m)); }


x86 assembly (clang, -O0):
<pow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <ln@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pow>:
push   %rax
movsd  %xmm1,(%rsp)
call   1040 <ln@plt>
mulsd  (%rsp),%xmm0
pop    %rax
jmp    1030 <exp@plt>

LLVM IR (-O0):
define double @pow(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = load double, double* %3
%7 = call double @ln(double %6)
%8 = fmul double %5, %7
%9 = call double @exp(double %8)
ret double %9
}

LLVM IR (-O2):
define double @pow(double %0, double %1) {
%3 = tail call double @ln(double %0)
%4 = fmul double %3, %1
%5 = tail call double @exp(double %4)
ret double %5
}
int bar(unsigned int t) {
  int a = t;
  return a == t;
}


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

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

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

LLVM IR (-O2):
define i32 @bar(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ err_check(scalar_t__);
scalar_t__ errno;
int main(void) {
  errno = 0;
  err_check(errno);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
movq   $0x0,(%rax)
mov    0x2eac(%rip),%rax
mov    (%rax),%rdi
call   1030 <err_check@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
movq   $0x0,(%rax)
xor    %edi,%edi
call   1030 <err_check@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i64 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
store i64 0, i64* @errno
%2 = load i64, i64* @errno
%3 = call i32 @err_check(i64 %2)
ret i32 0
}

LLVM IR (-O2):
@errno = global i64 0
define i32 @main() {
store i64 0, i64* @errno
%1 = tail call i32 @err_check(i64 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ scaleidctqtab(int *, int);
void initcol(int q[][64]) {
  scaleidctqtab(q[1], ((int)((1.77200) * (1 << 11) + .5)));
  scaleidctqtab(q[2], ((int)((1.40200) * (1 << 11) + .5)));
}


x86 assembly (clang, -O0):
<initcol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
add    $0x100,%rdi
mov    $0xe2d,%esi
call   1030 <scaleidctqtab@plt>
mov    -0x8(%rbp),%rdi
add    $0x200,%rdi
mov    $0xb37,%esi
call   1030 <scaleidctqtab@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initcol>:
push   %rbx
mov    %rdi,%rbx
add    $0x100,%rdi
mov    $0xe2d,%esi
call   1030 <scaleidctqtab@plt>
add    $0x200,%rbx
mov    %rbx,%rdi
mov    $0xb37,%esi
pop    %rbx
jmp    1030 <scaleidctqtab@plt>

LLVM IR (-O0):
define void @initcol([64 x i32]* %0) {
%2 = alloca [64 x i32]*
store [64 x i32]* %0, [64 x i32]** %2
%3 = load [64 x i32]*, [64 x i32]** %2
%4 = getelementptr inbounds [64 x i32], [64 x i32]* %3, i64 1
%5 = getelementptr inbounds [64 x i32], [64 x i32]* %4, i64 0, i64 0
%6 = call i32 @scaleidctqtab(i32* %5, i32 3629)
%7 = load [64 x i32]*, [64 x i32]** %2
%8 = getelementptr inbounds [64 x i32], [64 x i32]* %7, i64 2
%9 = getelementptr inbounds [64 x i32], [64 x i32]* %8, i64 0, i64 0
%10 = call i32 @scaleidctqtab(i32* %9, i32 2871)
ret void
}

LLVM IR (-O2):
define void @initcol([64 x i32]* %0) {
%2 = getelementptr inbounds [64 x i32], [64 x i32]* %0, i64 1, i64 0
%3 = tail call i32 @scaleidctqtab(i32* %2, i32 3629)
%4 = getelementptr inbounds [64 x i32], [64 x i32]* %0, i64 2, i64 0
%5 = tail call i32 @scaleidctqtab(i32* %4, i32 2871)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ yas_lis331dl_write_reg_byte(int, int);
int yas_lis331dl_power_down(void) {
  yas_lis331dl_write_reg_byte(0x20, 0x07);
  return (0);
}


x86 assembly (clang, -O0):
<yas_lis331dl_power_down>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
mov    $0x7,%esi
call   1030 <yas_lis331dl_write_reg_byte@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<yas_lis331dl_power_down>:
push   %rax
mov    $0x20,%edi
mov    $0x7,%esi
call   1030 <yas_lis331dl_write_reg_byte@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @yas_lis331dl_power_down() {
%1 = call i32 @yas_lis331dl_write_reg_byte(i32 32, i32 7)
ret i32 0
}

LLVM IR (-O2):
define i32 @yas_lis331dl_power_down() {
%1 = tail call i32 @yas_lis331dl_write_reg_byte(i32 32, i32 7)
ret i32 0
}
void rop3_204_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  *D = (S & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_204_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_204_1_1>:
or     %edx,%esi
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_204_1_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load i8, i8* %5
%8 = zext i8 %7 to i32
%9 = load i8, i8* %5
%10 = zext i8 %9 to i32
%11 = xor i32 %10, -1
%12 = and i32 %8, %11
%13 = load i8, i8* %6
%14 = zext i8 %13 to i32
%15 = xor i32 %14, -1
%16 = and i32 %12, %15
%17 = load i8*, i8** %4
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = load i8, i8* %5
%21 = zext i8 %20 to i32
%22 = and i32 %19, %21
%23 = or i32 %16, %22
%24 = load i8*, i8** %4
%25 = load i8, i8* %24
%26 = zext i8 %25 to i32
%27 = load i8, i8* %6
%28 = zext i8 %27 to i32
%29 = and i32 %26, %28
%30 = or i32 %23, %29
%31 = trunc i32 %30 to i8
%32 = load i8*, i8** %4
store i8 %31, i8* %32
ret void
}

LLVM IR (-O2):
define void @rop3_204_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %4, %5
store i8 %6, i8* %0
ret void
}
unsigned hash(char *s) {
  unsigned hashval;
  for (hashval = 0; *s != '\0'; s++) {
    hashval = *s + 31 * hashval;
  }
  return (hashval % 101);
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1140 <hash+0x40>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
imul   $0x1f,-0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0x65,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1147 <hash+0x47>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movsbl %cl,%ecx
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
mov    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
mov    %eax,%ecx
imul   $0x446f8657,%rcx,%rcx
shr    $0x20,%rcx
mov    %eax,%edx
sub    %ecx,%edx
shr    %edx
add    %ecx,%edx
shr    $0x6,%edx
imul   $0x65,%edx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = sext i8 %5 to i32
%9 = mul i32 %6, 31
%10 = add i32 %9, %8
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %10, 101
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ hnput(unsigned char *, long long, size_t);
unsigned char *hnoptput(unsigned char *p, int opt, long long data, size_t len) {
  *p++ = opt;
  *p++ = (unsigned char)len;
  hnput(p, data, len);
  return p + len;
}


x86 assembly (clang, -O0):
<hnoptput>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x20(%rbp),%rax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <hnput@plt>
mov    -0x8(%rbp),%rax
add    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hnoptput>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdi,%rbx
mov    %sil,(%rdi)
add    $0x2,%rdi
mov    %r14b,0x1(%rbx)
mov    %rdx,%rsi
mov    %rcx,%rdx
call   1030 <hnput@plt>
lea    (%rbx,%r14,1),%rax
add    $0x2,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @hnoptput(i8* %0, i32 %1, i64 %2, i64 %3) {
%5 = trunc i32 %1 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %0
%7 = trunc i64 %3 to i8
%8 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %7, i8* %6
%9 = tail call i32 @hnput(i8* %8, i64 %2, i64 %3)
%10 = getelementptr inbounds i8, i8* %8, i64 %3
ret i8* %10
}
/* Variables and functions */
int strcmp(char *, char *);
int cmpStr(void *s1, void *s2) { return strcmp((char *)s1, (char *)s2); }


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

x86 assembly (clang, -O2):
<cmpStr>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @cmpStr(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}