xunge/DecIR huggingface dataset:
/* Variables and functions */
int tiaoxin_tablebased_decrypt(unsigned char *, unsigned long long *,
                               unsigned char *, unsigned char const *,
                               unsigned long long, unsigned char const *,
                               unsigned long long, unsigned char const *,
                               unsigned char const *);
int crypto_aead_decrypt(unsigned char *m, unsigned long long *mlen,
                        unsigned char *nsec, const unsigned char *c,
                        unsigned long long clen, const unsigned char *ad,
                        unsigned long long adlen, const unsigned char *npub,
                        const unsigned char *k) {
  return tiaoxin_tablebased_decrypt(m, mlen, nsec, c, clen, ad, adlen, npub, k);
}


x86 assembly (clang, -O0):
<crypto_aead_decrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    0x10(%rbp),%r11
mov    0x18(%rbp),%r10
mov    0x20(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <tiaoxin_tablebased_decrypt@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypto_aead_decrypt>:
jmp    1030 <tiaoxin_tablebased_decrypt@plt>

LLVM IR (-O0):
define i32 @crypto_aead_decrypt(i8* %0, i64* %1, i8* %2, i8* %3, i64 %4, i8* %5, i64 %6, i8* %7, i8* %8) {
%10 = alloca i8*
%11 = alloca i64*
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i64
%15 = alloca i8*
%16 = alloca i64
%17 = alloca i8*
%18 = alloca i8*
store i8* %0, i8** %10
store i64* %1, i64** %11
store i8* %2, i8** %12
store i8* %3, i8** %13
store i64 %4, i64* %14
store i8* %5, i8** %15
store i64 %6, i64* %16
store i8* %7, i8** %17
store i8* %8, i8** %18
%19 = load i8*, i8** %10
%20 = load i64*, i64** %11
%21 = load i8*, i8** %12
%22 = load i8*, i8** %13
%23 = load i64, i64* %14
%24 = load i8*, i8** %15
%25 = load i64, i64* %16
%26 = load i8*, i8** %17
%27 = load i8*, i8** %18
%28 = call i32 @tiaoxin_tablebased_decrypt(i8* %19, i64* %20, i8* %21, i8* %22, i64 %23, i8* %24, i64 %25, i8* %26, i8* %27)
ret i32 %28
}

LLVM IR (-O2):
define i32 @crypto_aead_decrypt(i8* %0, i64* %1, i8* %2, i8* %3, i64 %4, i8* %5, i64 %6, i8* %7, i8* %8) {
%10 = tail call i32 @tiaoxin_tablebased_decrypt(i8* %0, i64* %1, i8* %2, i8* %3, i64 %4, i8* %5, i64 %6, i8* %7, i8* %8)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char **str_split(char *, char);
void main() {
  char *ch = "bonjour monsiueur kama";
  char **res = str_split(ch, ' ');
  printf("%s --", res[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x20,%esi
call   1040 <str_split@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    $0x20,%esi
call   1040 <str_split@plt>
mov    0x8(%rax),%rsi
lea    0xeda(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"bonjour monsiueur kama\00"
@.str.1 = [6 x i8] c"%s --\00"
define void @main() {
%1 = alloca i8*
%2 = alloca i8**
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8** %1
%3 = load i8*, i8** %1
%4 = call i8** @str_split(i8* %3, i8 signext 32)
store i8** %4, i8*** %2
%5 = load i8**, i8*** %2
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"bonjour monsiueur kama\00"
@.str.1 = [6 x i8] c"%s --\00"
define void @main() {
%1 = tail call i8** @str_split(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8 signext 32)
%2 = getelementptr inbounds i8*, i8** %1, i64 1
%3 = load i8*, i8** %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ system(char *);
main() {
  int I, S;
  S = 0;
  I = 1;
  while (I <= 100) {
    S = S + I;
    I = I + 1;
  }
  printf("\n %d", S);
  system("PAUSE");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     115e <main+0x3e>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
lea    0xe91(%rip),%rdi
call   1030 <system@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"\0A %d\00"
@.str.1 = [6 x i8] c"PAUSE\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 5050)
%2 = tail call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __assert(int, int);
scalar_t__ anotherTest(int);
int test(void) {
  int a = 42;
  a += anotherTest(a);
  __assert(a == 42 + 53, 39);
  return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2a,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <anotherTest@plt>
mov    %rax,%rcx
movslq -0x4(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x4(%rbp)
cmpl   $0x5f,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x27,%esi
call   1030 <__assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    $0x2a,%edi
call   1040 <anotherTest@plt>
xor    %edi,%edi
cmp    $0x35,%eax
sete   %dil
mov    $0x27,%esi
call   1030 <__assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test() {
%1 = alloca i32
store i32 42, i32* %1
%2 = load i32, i32* %1
%3 = call i64 @anotherTest(i32 %2)
%4 = load i32, i32* %1
%5 = sext i32 %4 to i64
%6 = add nsw i64 %5, %3
%7 = trunc i64 %6 to i32
store i32 %7, i32* %1
%8 = load i32, i32* %1
%9 = icmp eq i32 %8, 95
%10 = zext i1 %9 to i32
%11 = call i32 @__assert(i32 %10, i32 39)
ret i32 0
}

LLVM IR (-O2):
define i32 @test() {
%1 = tail call i64 @anotherTest(i32 42)
%2 = trunc i64 %1 to i32
%3 = icmp eq i32 %2, 53
%4 = zext i1 %3 to i32
%5 = tail call i32 @__assert(i32 %4, i32 39)
ret i32 0
}
int func(void) {
  int n = 3;
  int m = 5;
  n = (--m);
  return 0;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
__attribute__((__no__)) int add513(int a, int *b) {
  int c = a + 513;
  if (c == 0)
    *b = a;
  return c;
}


x86 assembly (clang, -O0):
<add513>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0x201,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1129 <add513+0x29>
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add513>:
mov    %edi,%eax
add    $0x201,%eax
je     110a <add513+0xa>
ret
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define i32 @add513(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 513
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i32, i32* %3
%12 = load i32*, i32** %4
store i32 %11, i32* %12
br label %13
13: ; preds = %10, %2
%14 = load i32, i32* %5
ret i32 %14
}

LLVM IR (-O2):
define i32 @add513(i32 %0, i32* nocapture writeonly %1) {
%3 = add nsw i32 %0, 513
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
store i32 %0, i32* %1
br label %6
6: ; preds = %5, %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ pe_emit_get_std_handle(int, int);
void pe_emit_main_init() {
  pe_emit_get_std_handle((-10), 0x800);
  pe_emit_get_std_handle((-11), 0x804);
}


x86 assembly (clang, -O0):
<pe_emit_main_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffff6,%edi
mov    $0x800,%esi
call   1030 <pe_emit_get_std_handle@plt>
mov    $0xfffffff5,%edi
mov    $0x804,%esi
call   1030 <pe_emit_get_std_handle@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pe_emit_main_init>:
push   %rax
mov    $0xfffffff6,%edi
mov    $0x800,%esi
call   1030 <pe_emit_get_std_handle@plt>
mov    $0xfffffff5,%edi
mov    $0x804,%esi
pop    %rax
jmp    1030 <pe_emit_get_std_handle@plt>

LLVM IR (-O0):
define void @pe_emit_main_init() {
%1 = call i32 @pe_emit_get_std_handle(i32 -10, i32 2048)
%2 = call i32 @pe_emit_get_std_handle(i32 -11, i32 2052)
ret void
}

LLVM IR (-O2):
define void @pe_emit_main_init() {
%1 = tail call i32 @pe_emit_get_std_handle(i32 -10, i32 2048)
%2 = tail call i32 @pe_emit_get_std_handle(i32 -11, i32 2052)
ret void
}
unsigned char RussianToUpper(unsigned char symb) {
  if ((symb >= 160) && (symb <= 175)) {
    symb -= 32;
  } else if ((symb >= 224) && (symb <= 239)) {
    symb -= 80;
  }
  return symb;
}


x86 assembly (clang, -O0):
<RussianToUpper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0xa0,%eax
jl     1137 <RussianToUpper+0x37>
movzbl -0x1(%rbp),%eax
cmp    $0xaf,%eax
jg     1137 <RussianToUpper+0x37>
movzbl -0x1(%rbp),%eax
sub    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1164 <RussianToUpper+0x64>
movzbl -0x1(%rbp),%eax
cmp    $0xe0,%eax
jl     115f <RussianToUpper+0x5f>
movzbl -0x1(%rbp),%eax
cmp    $0xef,%eax
jg     115f <RussianToUpper+0x5f>
movzbl -0x1(%rbp),%eax
sub    $0x50,%eax
mov    %al,-0x1(%rbp)
jmp    1164 <RussianToUpper+0x64>
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RussianToUpper>:
mov    %edi,%eax
and    $0xf0,%al
lea    -0x20(%rdi),%ecx
lea    -0x50(%rdi),%edx
cmp    $0xe0,%al
movzbl %dl,%edx
cmovne %edi,%edx
cmp    $0xa0,%al
movzbl %cl,%eax
cmovne %edx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @RussianToUpper(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp sge i32 %4, 160
br i1 %5, label %6, label %15
6: ; preds = %1
%7 = load i8, i8* %2
%8 = zext i8 %7 to i32
%9 = icmp sle i32 %8, 175
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = load i8, i8* %2
%12 = zext i8 %11 to i32
%13 = sub nsw i32 %12, 32
%14 = trunc i32 %13 to i8
store i8 %14, i8* %2
br label %29
15: ; preds = %6, %1
%16 = load i8, i8* %2
%17 = zext i8 %16 to i32
%18 = icmp sge i32 %17, 224
br i1 %18, label %19, label %28
19: ; preds = %15
%20 = load i8, i8* %2
%21 = zext i8 %20 to i32
%22 = icmp sle i32 %21, 239
br i1 %22, label %23, label %28
23: ; preds = %19
%24 = load i8, i8* %2
%25 = zext i8 %24 to i32
%26 = sub nsw i32 %25, 80
%27 = trunc i32 %26 to i8
store i8 %27, i8* %2
br label %28
28: ; preds = %23, %19, %15
br label %29
29: ; preds = %28, %10
%30 = load i8, i8* %2
ret i8 %30
}

LLVM IR (-O2):
define zeroext i8 @RussianToUpper(i8 zeroext %0) {
%2 = and i8 %0, -16
%3 = icmp eq i8 %2, -96
%4 = add nsw i8 %0, -32
%5 = icmp eq i8 %2, -32
%6 = add i8 %0, -80
%7 = select i1 %5, i8 %6, i8 %0
%8 = select i1 %3, i8 %4, i8 %7
ret i8 %8
}
/* Variables and functions */
int /*<<< orphan*/ check_load();
int main(int argc, char *argv[]) {
  check_load();
  for (;;) {
  }
  return 0;
}


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)
mov    $0x0,%al
call   1030 <check_load@plt>
jmp    112d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <check_load@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <main+0x10>

LLVM IR (-O0):
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 = call i32 (...) @check_load()
br label %7
7: ; preds = %7, %2
br label %7
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @check_load()
br label %4
4: ; preds = %4, %2
br label %4
}
regx0adr1_set(r0, r1, x0, x1, p0, p1) char r0, r1;
char *p0, *p1;
{ (p0[x0]) = (*((char *)11111111)); }


x86 assembly (clang, -O0):
<regx0adr1_set>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    $0xa98ac7,%eax
mov    (%rax),%dl
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<regx0adr1_set>:
mov    0xa98ac7,%al
movslq %edx,%rcx
mov    %al,(%r8,%rcx,1)
ret

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

LLVM IR (-O2):
define i32 @regx0adr1_set(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture writeonly %4, i8* nocapture readnone %5) {
%7 = load i8, i8* inttoptr (i64 11111111 to i8*)
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds i8, i8* %4, i64 %8
store i8 %7, i8* %9
ret i32 undef
}
/* Type definitions */
struct cusp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free_object(int, short *);
void free_cusp(struct cusp *csp) { free_object(15, (short *)csp); }


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

x86 assembly (clang, -O2):
<free_cusp>:
mov    %rdi,%rsi
mov    $0xf,%edi
jmp    1030 <free_object@plt>

LLVM IR (-O0):
%struct.cusp = type { i32 }
define void @free_cusp(%struct.cusp* %0) {
%2 = alloca %struct.cusp*
store %struct.cusp* %0, %struct.cusp** %2
%3 = load %struct.cusp*, %struct.cusp** %2
%4 = bitcast %struct.cusp* %3 to i16*
%5 = call i32 @free_object(i32 15, i16* %4)
ret void
}

LLVM IR (-O2):
%struct.cusp = type { i32 }
define void @free_cusp(%struct.cusp* %0) {
%2 = bitcast %struct.cusp* %0 to i16*
%3 = tail call i32 @free_object(i32 15, i16* %2)
ret void
}
long long bit21() { return 0x0000000000200000LL; }


x86 assembly (clang, -O0):
<bit21>:
push   %rbp
mov    %rsp,%rbp
mov    $0x200000,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @bit21() {
ret i64 2097152
}

LLVM IR (-O2):
define i64 @bit21() {
ret i64 2097152
}
int fun859() { return 859; }


x86 assembly (clang, -O0):
<fun859>:
push   %rbp
mov    %rsp,%rbp
mov    $0x35b,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fun859() {
ret i32 859
}

LLVM IR (-O2):
define i32 @fun859() {
ret i32 859
}
char mostcharofstring(const char *s) {}


x86 assembly (clang, -O0):
<mostcharofstring>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define signext i8 @mostcharofstring(i8* nocapture readnone %0) {
ret i8 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int __rsyscall(int, int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
               int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int setgid(gid_t gid) { return __rsyscall(214, gid, 0, 0, 0, 0, 0); }


x86 assembly (clang, -O0):
<setgid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0xd6,%edi
xor    %r9d,%r9d
mov    %r9d,%edx
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <__rsyscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setgid>:
push   %rax
mov    %edi,%esi
movl   $0x0,(%rsp)
mov    $0xd6,%edi
xor    %edx,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <__rsyscall@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @setgid(i32 %0) {
%2 = tail call i32 @__rsyscall(i32 214, i32 %0, i32 0, i32 0, i32 0, i32 0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  ((void)argc);
  ((void)argv);
  printf("POLARSSL_MD5_C and/or POLARSSL_FS_IO not defined.\n");
  return (0);
}


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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [51 x i8] c"POLARSSL_MD5_C and/or POLARSSL_FS_IO not defined.\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 = load i8**, i8*** %5
%8 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [50 x i8] c"POLARSSL_MD5_C and/or POLARSSL_FS_IO not defined.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int f_magenta() { return fputs("[35m", stdout); }


x86 assembly (clang, -O0):
<f_magenta>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_magenta>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[35m\00"
@stdout = global i32 0
define i32 @f_magenta() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[35m\00"
@stdout = global i32 0
define i32 @f_magenta() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ emitanoperand(int, char *, int);
int /*<<< orphan*/ printf(char *);
void emittwooperandsb(void) {
  printf(" ");
  emitanoperand(2, "ds:byte ptr", 1);
  printf(",");
  emitanoperand(1, "ds:byte ptr", 1);
}


x86 assembly (clang, -O0):
<emittwooperandsb>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
lea    0xec6(%rip),%rsi
mov    $0x1,%edx
call   1040 <emitanoperand@plt>
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edx
lea    0xea4(%rip),%rsi
mov    %edx,%edi
call   1040 <emitanoperand@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<emittwooperandsb>:
push   %rbx
mov    $0x20,%edi
call   1030 <putchar@plt>
lea    0xece(%rip),%rbx
mov    $0x2,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1040 <emitanoperand@plt>
mov    $0x2c,%edi
call   1030 <putchar@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    $0x1,%edx
pop    %rbx
jmp    1040 <emitanoperand@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
@.str.1 = [12 x i8] c"ds:byte ptr\00"
@.str.2 = [2 x i8] c",\00"
define void @emittwooperandsb() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @emitanoperand(i32 2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @emitanoperand(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str.1 = [12 x i8] c"ds:byte ptr\00"
define void @emittwooperandsb() {
%1 = tail call i32 @putchar(i32 32)
%2 = tail call i32 @emitanoperand(i32 2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 1)
%3 = tail call i32 @putchar(i32 44)
%4 = tail call i32 @emitanoperand(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sig_handler(int signo) { printf("SIGPIPE  \n"); }


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

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

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

LLVM IR (-O2):
@str = [10 x i8] c"SIGPIPE \00"
define void @sig_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
float SpaSize(int n, int np, float sum_npw) {
  return (sum_npw * 8 + np * 8 + n * 4) / 1024.;
}


x86 assembly (clang, -O0):
<SpaSize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%eax
shl    $0x3,%eax
cvtsi2ss %eax,%xmm1
movss  0xee2(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
cvtsi2ss %eax,%xmm1
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb8(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<SpaSize>:
shl    $0x3,%esi
cvtsi2ss %esi,%xmm1
mulss  0xef1(%rip),%xmm0
shl    $0x2,%edi
cvtsi2ss %edi,%xmm2
addss  %xmm1,%xmm0
addss  %xmm2,%xmm0
mulss  0xede(%rip),%xmm0
ret

LLVM IR (-O0):
define float @SpaSize(i32 %0, i32 %1, float %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
store i32 %0, i32* %4
store i32 %1, i32* %5
store float %2, float* %6
%7 = load float, float* %6
%8 = load i32, i32* %5
%9 = mul nsw i32 %8, 8
%10 = sitofp i32 %9 to float
%11 = call float @llvm.fmuladd.f32(float %7, float 8.000000e+00, float %10)
%12 = load i32, i32* %4
%13 = mul nsw i32 %12, 4
%14 = sitofp i32 %13 to float
%15 = fadd float %11, %14
%16 = fpext float %15 to double
%17 = fdiv double %16, 1.024000e+03
%18 = fptrunc double %17 to float
ret float %18
}

LLVM IR (-O2):
define float @SpaSize(i32 %0, i32 %1, float %2) {
%4 = shl nsw i32 %1, 3
%5 = sitofp i32 %4 to float
%6 = tail call float @llvm.fmuladd.f32(float %2, float 8.000000e+00, float %5)
%7 = shl nsw i32 %0, 2
%8 = sitofp i32 %7 to float
%9 = fadd float %6, %8
%10 = fmul float %9, 0x3F50000000000000
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ perror(char const *);
void error(const char *msg) { perror(msg); }


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

x86 assembly (clang, -O2):
<error>:
jmp    1030 <perror@plt>

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

LLVM IR (-O2):
define void @error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
void waitForUserInput(void) {
  (void)printf("Press return to exit the application. \r\n");
  (void)getchar();
}


x86 assembly (clang, -O0):
<waitForUserInput>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitForUserInput>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getchar@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"Press return to exit the application. \0D\0A\00"
define void @waitForUserInput() {
%1 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @getchar()
ret void
}

LLVM IR (-O2):
@str = [40 x i8] c"Press return to exit the application. \0D\00"
define void @waitForUserInput() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @getchar()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x2a() {
  Assert_real((isascii(42)),
              "/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_isascii.c",
              215, ("isascii should be 1 for *"));
}


x86 assembly (clang, -O0):
<t_isascii_0x2a>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2a,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xd7,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x2a>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0xd7,%edx
jmp    1030 <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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for *\00"
define void @t_isascii_0x2a() {
%1 = call i32 @isascii(i32 42)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 215, i8* getelementptr inbounds ([26 x i8], [26 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_isascii.c\00"
@.str.1 = [26 x i8] c"isascii should be 1 for *\00"
define void @t_isascii_0x2a() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 215, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
float __ocml_floor_f32(float);
float floorf(float x) { return __ocml_floor_f32(x); }


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

x86 assembly (clang, -O2):
<floorf>:
jmp    1030 <__ocml_floor_f32@plt>

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

LLVM IR (-O2):
define float @floorf(float %0) {
%2 = tail call float @__ocml_floor_f32(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ _my_log(char *, int, char *, char *, int, char const *);
void log_info(const char *errstr) {
  do {
    _my_log("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/zhongliangkang/twemproxy41/refs/heads/"
            "master/migrate/migrate.c",
            380, "[ INFO ] at %s:%d ,info: %s\n",
            "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/zhongliangkang/twemproxy41/refs/heads/"
            "master/migrate/migrate.c",
            380, errstr);
  } while (0);
}


x86 assembly (clang, -O0):
<log_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%r9
lea    0xed9(%rip),%rcx
mov    $0x17c,%r8d
lea    0xf65(%rip),%rdx
mov    %rcx,%rdi
mov    %r8d,%esi
call   1030 <_my_log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_info>:
mov    %rdi,%r9
lea    0xf7f(%rip),%rdx
lea    0xedf(%rip),%rcx
mov    %rcx,%rdi
mov    $0x17c,%esi
mov    $0x17c,%r8d
jmp    1030 <_my_log@plt>

LLVM IR (-O0):
@.str = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/zhongliangkang/twemproxy41/refs/heads/master/migrate/migrate.c\00"
@.str.1 = [29 x i8] c"[ INFO ] at %s:%d ,info: %s\0A\00"
define void @log_info(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1
%4 = load i8*, i8** %2
%5 = call i32 @_my_log(i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i32 380, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i32 380, i8* %4)
br label %6
6: ; preds = %3
ret void
}

LLVM IR (-O2):
@.str = [153 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/zhongliangkang/twemproxy41/refs/heads/master/migrate/migrate.c\00"
@.str.1 = [29 x i8] c"[ INFO ] at %s:%d ,info: %s\0A\00"
define void @log_info(i8* %0) {
%2 = tail call i32 @_my_log(i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i32 380, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([153 x i8], [153 x i8]* @.str, i64 0, i64 0), i32 380, i8* %0)
ret void
}
__float128 from_uns_long_load_n(unsigned long *a, long n) {
  return (__float128)a[n];
}


x86 assembly (clang, -O0):
<from_uns_long_load_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1130 <__floatunditf>
add    $0x10,%rsp
pop    %rbp
ret
nopw   0x0(%rax,%rax,1)

x86 assembly (clang, -O2):
<from_uns_long_load_n>:
push   %rax
mov    (%rdi,%rsi,8),%rdi
call   1110 <__floatunditf>
pop    %rax
ret
nopl   0x0(%rax)

LLVM IR (-O0):
define fp128 @from_uns_long_load_n(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %4
%7 = getelementptr inbounds i64, i64* %5, i64 %6
%8 = load i64, i64* %7
%9 = uitofp i64 %8 to fp128
ret fp128 %9
}

LLVM IR (-O2):
define fp128 @from_uns_long_load_n(i64* nocapture %0, i64 %1) {
%3 = getelementptr inbounds i64, i64* %0, i64 %1
%4 = load i64, i64* %3
%5 = uitofp i64 %4 to fp128
ret fp128 %5
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
uint8_t signum_u8(uint8_t i) {
  if (i > 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<signum_u8>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    1120 <signum_u8+0x20>
movq   $0x1,-0x8(%rbp)
jmp    1128 <signum_u8+0x28>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signum_u8>:
xor    %eax,%eax
test   %rdi,%rdi
setg   %al
ret

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

LLVM IR (-O2):
define i64 @signum_u8(i64 %0) {
%2 = icmp sgt i64 %0, 0
%3 = zext i1 %2 to i64
ret i64 %3
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef scalar_t__ int32_t;

/* Variables and functions */
uint32_t etna_smin(int32_t a, int32_t b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<etna_smin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <etna_smin+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <etna_smin+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<etna_smin>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @etna_smin(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @etna_smin(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void pinPUD(int pin, int pud) { ; }


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

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

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

LLVM IR (-O2):
define void @pinPUD(i32 %0, i32 %1) {
ret void
}
void rop3_151_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  unsigned char stk4;
  stk4 = T | S;
  stk4 = ~stk4;
  stk3 = *D | stk4;
  stk2 = S ^ stk3;
  stk1 = T ^ stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_151_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xe(%rbp)
movzbl -0xe(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xe(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xe(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_151_0_0>:
mov    %edx,%eax
or     %sil,%al
not    %al
or     (%rdi),%al
xor    %sil,%dl
xor    %al,%dl
mov    %dl,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_151_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = or i8 %2, %1
%5 = xor i8 %4, -1
%6 = load i8, i8* %0
%7 = or i8 %6, %5
%8 = xor i8 %2, %1
%9 = xor i8 %8, %7
store i8 %9, i8* %0
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *zcm_malloc(size_t sz) {
  if (sz)
    return malloc(sz);
  return NULL;
}


x86 assembly (clang, -O0):
<zcm_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1139 <zcm_malloc+0x29>
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
jmp    1141 <zcm_malloc+0x31>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zcm_malloc>:
test   %rdi,%rdi
je     111a <zcm_malloc+0xa>
jmp    1030 <malloc@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @zcm_malloc(i64 %0) {
%2 = alloca i8*
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i64, i64* %3
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %2
br label %10
9: ; preds = %1
store i8* null, i8** %2
br label %10
10: ; preds = %9, %6
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
define noalias i8* @zcm_malloc(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @malloc(i64 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
float par_shapes__dot3(float const *a, float const *b) {
  return b[0] * a[0] + b[1] * a[1] + b[2] * a[2];
}


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

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

LLVM IR (-O0):
define float @par_shapes__dot3(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
store float* %0, float** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = getelementptr inbounds float, float* %5, i64 0
%7 = load float, float* %6
%8 = load float*, float** %3
%9 = getelementptr inbounds float, float* %8, i64 0
%10 = load float, float* %9
%11 = load float*, float** %4
%12 = getelementptr inbounds float, float* %11, i64 1
%13 = load float, float* %12
%14 = load float*, float** %3
%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** %4
%20 = getelementptr inbounds float, float* %19, i64 2
%21 = load float, float* %20
%22 = load float*, float** %3
%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 @par_shapes__dot3(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = load float, float* %0
%5 = getelementptr inbounds float, float* %1, i64 1
%6 = load float, float* %5
%7 = getelementptr inbounds float, float* %0, 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* %1, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %0, 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 rk31sdk_get_sdio_wifi_voltage();
int rk31sdk_wifi_voltage_select(void) {
  int voltage;
  int voltage_flag = 0;
  voltage = rk31sdk_get_sdio_wifi_voltage();
  if (voltage >= 2700)
    voltage_flag = 0;
  else if (voltage <= 2000)
    voltage_flag = 1;
  else
    voltage_flag = 1;
  return voltage_flag;
}


x86 assembly (clang, -O0):
<rk31sdk_wifi_voltage_select>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rk31sdk_get_sdio_wifi_voltage@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0xa8c,-0x4(%rbp)
jl     1142 <rk31sdk_wifi_voltage_select+0x32>
movl   $0x0,-0x8(%rbp)
jmp    1167 <rk31sdk_wifi_voltage_select+0x57>
cmpl   $0x7d0,-0x4(%rbp)
jg     115b <rk31sdk_wifi_voltage_select+0x4b>
movl   $0x1,-0x8(%rbp)
jmp    1162 <rk31sdk_wifi_voltage_select+0x52>
movl   $0x1,-0x8(%rbp)
jmp    1167 <rk31sdk_wifi_voltage_select+0x57>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rk31sdk_wifi_voltage_select>:
push   %rax
xor    %eax,%eax
call   1030 <rk31sdk_get_sdio_wifi_voltage@plt>
xor    %ecx,%ecx
cmp    $0xa8c,%eax
setl   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @rk31sdk_wifi_voltage_select() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
%3 = call i32 (...) @rk31sdk_get_sdio_wifi_voltage()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp sge i32 %4, 2700
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 0, i32* %2
br label %13
7: ; preds = %0
%8 = load i32, i32* %1
%9 = icmp sle i32 %8, 2000
br i1 %9, label %10, label %11
10: ; preds = %7
store i32 1, i32* %2
br label %12
11: ; preds = %7
store i32 1, i32* %2
br label %12
12: ; preds = %11, %10
br label %13
13: ; preds = %12, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @rk31sdk_wifi_voltage_select() {
%1 = tail call i32 (...) @rk31sdk_get_sdio_wifi_voltage()
%2 = icmp slt i32 %1, 2700
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ MYSQL_RES;

/* Variables and functions */
char **mysql_fetch_row(int /*<<< orphan*/ *);
char **sql_fetch_result(void *res) { return mysql_fetch_row((MYSQL_RES *)res); }


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

x86 assembly (clang, -O2):
<sql_fetch_result>:
jmp    1030 <mysql_fetch_row@plt>

LLVM IR (-O0):
define i8** @sql_fetch_result(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = call i8** @mysql_fetch_row(i32* %4)
ret i8** %5
}

LLVM IR (-O2):
define i8** @sql_fetch_result(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i8** @mysql_fetch_row(i32* %2)
ret i8** %3
}
void PR11069(int a, int b) {
  unsigned long flags;
  for (;;) {
    if (a && !b)
      break;
  }
  for (;;) {
    (void)(flags);
  }
}


x86 assembly (clang, -O0):
<PR11069>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1123 <PR11069+0x23>
cmpl   $0x0,-0x8(%rbp)
jne    1123 <PR11069+0x23>
jmp    1128 <PR11069+0x28>
jmp    110a <PR11069+0xa>
jmp    112d <PR11069+0x2d>
jmp    112d <PR11069+0x2d>

x86 assembly (clang, -O2):
<PR11069>:
test   %edi,%edi
je     1120 <PR11069+0x20>
test   %esi,%esi
jne    1120 <PR11069+0x20>
nopl   0x0(%rax,%rax,1)
jmp    1110 <PR11069+0x10>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
jmp    1120 <PR11069+0x20>

LLVM IR (-O0):
define void @PR11069(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
br label %6
6: ; preds = %13, %2
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %4
%11 = icmp ne i32 %10, 0
br i1 %11, label %13, label %12
12: ; preds = %9
br label %14
13: ; preds = %9, %6
br label %6
14: ; preds = %12
br label %15
15: ; preds = %15, %14
%16 = load i64, i64* %5
br label %15
}

LLVM IR (-O2):
define void @PR11069(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
%4 = icmp ne i32 %1, 0
%5 = or i1 %3, %4
br i1 %5, label %6, label %7
6: ; preds = %2, %6
br label %6
7: ; preds = %2, %7
br label %7
}
float(cimagf)(float _Complex x) { return __builtin_cimagf(x); }


x86 assembly (clang, -O0):
<cimagf>:
push   %rbp
mov    %rsp,%rbp
movlpd %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cimagf>:
shufps $0x55,%xmm0,%xmm0
ret

LLVM IR (-O0):
define float @cimagf(<2 x float> %0) {
%2 = alloca { float, float }
%3 = bitcast { float, float }* %2 to <2 x float>*
store <2 x float> %0, <2 x float>* %3
%4 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 0
%5 = load float, float* %4
%6 = getelementptr inbounds { float, float }, { float, float }* %2, i32 0, i32 1
%7 = load float, float* %6
ret float %7
}

LLVM IR (-O2):
define float @cimagf(<2 x float> %0) {
%2 = extractelement <2 x float> %0, i64 1
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *const,
                           unsigned int);
int /*<<< orphan*/ stderr;
void die(const char *const file, unsigned int line) {
  fprintf(stderr, "a runtime error occurred.  see source file %s at line %u\n",
          file, line);
  exit(-1);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
lea    0xeba(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
mov    %esi,%ecx
mov    %rdi,%rdx
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [58 x i8] c"a runtime error occurred. see source file %s at line %u\0A\00"
define void @die(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
%9 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [58 x i8] c"a runtime error occurred. see source file %s at line %u\0A\00"
define void @die(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%5 = tail call i32 @exit(i32 -1)
unreachable
}