xunge/DecIR huggingface dataset:
int weaponsmith(element)
int element;
{
  switch (element) {
  case 10:
  case 11:
  case 12:
  case 20:
  case 21:
  case 22:
  case 23:
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<weaponsmith>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xfffffff6,%eax
sub    $0x3,%eax
jb     1132 <weaponsmith+0x32>
jmp    111e <weaponsmith+0x1e>
mov    -0xc(%rbp),%eax
add    $0xffffffec,%eax
sub    $0x3,%eax
ja     113e <weaponsmith+0x3e>
jmp    1132 <weaponsmith+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1145 <weaponsmith+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<weaponsmith>:
add    $0xfffffff6,%edi
xor    %eax,%eax
cmp    $0xd,%edi
ja     1117 <weaponsmith+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

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

LLVM IR (-O2):
@switch.table.weaponsmith = [14 x i32] [i32 1, i32 1, i32 1, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 0, i32 1, i32 1, i32 1, i32 1]
define i32 @weaponsmith(i32 %0) {
%2 = add i32 %0, -10
%3 = icmp ult i32 %2, 14
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [14 x i32], [14 x i32]* @switch.table.weaponsmith, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
int f() {
  int n = -12;
  return 0;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0xfffffff4,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f() {
%1 = alloca i32
store i32 -12, i32* %1
ret i32 0
}

LLVM IR (-O2):
define i32 @f() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char const *);
int /*<<< orphan*/ system(char *);
void gnuplot(const char *gnucommand) {
  char syscommand[1024];
  sprintf(syscommand, "echo \"%s\" | gnuplot -persist", gnucommand);
  system(syscommand);
}


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

x86 assembly (clang, -O2):
<gnuplot>:
push   %rbx
sub    $0x400,%rsp
mov    %rdi,%rdx
lea    0xece(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"echo \22%s\22 | gnuplot -persist\00"
define void @gnuplot(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = call i32 @system(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"echo \22%s\22 | gnuplot -persist\00"
define void @gnuplot(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i32 @system(i8* %3)
ret void
}
int test_imm_C2uint16_reg(unsigned short val) {
  return ((val) & (-0xC2 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C2uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff3e,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C2uint16_reg>:
test   $0xff3e,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_C2uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -194
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_C2uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -194
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ region_write(int, int, int, int);
int /*<<< orphan*/ set2clear(int, int, int);
int i2c_init(void) {
  region_write(((0xE0200000 + 0x0A0) + ((1) << 5)), 0xff, 0, 0x22);
  set2clear(((0xF2000000 + ((1) << 20)) + 0x0014), 0x1, 14);
  region_write((0xE1800000), 0x1, 6, 1);
  region_write((0xE1800000), 0x1, 5, 1);
  region_write((0xE1800000), 0xf, 0, 0xffff);
  return 0;
}


x86 assembly (clang, -O0):
<i2c_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe02000c0,%edi
mov    $0xff,%esi
xor    %edx,%edx
mov    $0x22,%ecx
call   1040 <region_write@plt>
mov    $0xf2100014,%edi
mov    $0x1,%esi
mov    $0xe,%edx
call   1030 <set2clear@plt>
mov    $0xe1800000,%edi
mov    $0x1,%ecx
mov    $0x6,%edx
mov    %ecx,%esi
call   1040 <region_write@plt>
mov    $0xe1800000,%edi
mov    $0x1,%ecx
mov    $0x5,%edx
mov    %ecx,%esi
call   1040 <region_write@plt>
mov    $0xe1800000,%edi
mov    $0xf,%esi
xor    %edx,%edx
mov    $0xffff,%ecx
call   1040 <region_write@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i2c_init>:
push   %rax
mov    $0xe02000c0,%edi
mov    $0xff,%esi
xor    %edx,%edx
mov    $0x22,%ecx
call   1040 <region_write@plt>
mov    $0xf2100014,%edi
mov    $0x1,%esi
mov    $0xe,%edx
call   1030 <set2clear@plt>
mov    $0xe1800000,%edi
mov    $0x1,%esi
mov    $0x6,%edx
mov    $0x1,%ecx
call   1040 <region_write@plt>
mov    $0xe1800000,%edi
mov    $0x1,%esi
mov    $0x5,%edx
mov    $0x1,%ecx
call   1040 <region_write@plt>
mov    $0xe1800000,%edi
mov    $0xf,%esi
xor    %edx,%edx
mov    $0xffff,%ecx
call   1040 <region_write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @i2c_init() {
%1 = call i32 @region_write(i32 -534773568, i32 255, i32 0, i32 34)
%2 = call i32 @set2clear(i32 -233832428, i32 1, i32 14)
%3 = call i32 @region_write(i32 -511705088, i32 1, i32 6, i32 1)
%4 = call i32 @region_write(i32 -511705088, i32 1, i32 5, i32 1)
%5 = call i32 @region_write(i32 -511705088, i32 15, i32 0, i32 65535)
ret i32 0
}

LLVM IR (-O2):
define i32 @i2c_init() {
%1 = tail call i32 @region_write(i32 -534773568, i32 255, i32 0, i32 34)
%2 = tail call i32 @set2clear(i32 -233832428, i32 1, i32 14)
%3 = tail call i32 @region_write(i32 -511705088, i32 1, i32 6, i32 1)
%4 = tail call i32 @region_write(i32 -511705088, i32 1, i32 5, i32 1)
%5 = tail call i32 @region_write(i32 -511705088, i32 15, i32 0, i32 65535)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x2a() {
  Assert_real((isbdigit(42) == 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_isbdigit.c",
              215, ("isbdigit should be 0 for *"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0x2a>:
push   %rax
mov    $0x2a,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0xd7,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for *\00"
define void @t_isbdigit_0x2a() {
%1 = call i64 @isbdigit(i32 42)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 215, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [27 x i8] c"isbdigit should be 0 for *\00"
define void @t_isbdigit_0x2a() {
%1 = tail call i64 @isbdigit(i32 42)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 215, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int setpgrp(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @setpgrp() {
ret i32 0
}

LLVM IR (-O2):
define i32 @setpgrp() {
ret i32 0
}
int addTwoIntsStatic(int a, int b) { return a + b; }


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

x86 assembly (clang, -O2):
<addTwoIntsStatic>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @addTwoIntsStatic(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void memfree(char *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<memfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @memfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func1();
int main() { func1(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @func1()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @func1()
ret i32 0
}
int test_imm_1Cint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x1C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_1Cint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0x1c,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_1Cint64_midword_mem>:
testb  $0x1c,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_1Cint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 16
%6 = and i64 %5, 28
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_1Cint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 1835008
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ setLinuxTextColor(int, int);
void setTextColor(int foreground, int background) {
  setLinuxTextColor(foreground, background);
}


x86 assembly (clang, -O0):
<setTextColor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <setLinuxTextColor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setTextColor>:
jmp    1030 <setLinuxTextColor@plt>

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

LLVM IR (-O2):
define void @setTextColor(i32 %0, i32 %1) {
%3 = tail call i32 @setLinuxTextColor(i32 %0, i32 %1)
ret void
}
int ispunct(int c) {
  return (32 < c && c < 48) || (57 < c && c < 65) || (90 < c && c < 97) ||
         (122 < c && c < 127);
}


x86 assembly (clang, -O0):
<ispunct>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x20,%eax
cmp    -0x4(%rbp),%eax
jge    1124 <ispunct+0x24>
mov    $0x1,%al
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1181 <ispunct+0x81>
mov    $0x39,%eax
cmp    -0x4(%rbp),%eax
jge    1141 <ispunct+0x41>
mov    $0x1,%al
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1181 <ispunct+0x81>
mov    $0x5a,%eax
cmp    -0x4(%rbp),%eax
jge    115e <ispunct+0x5e>
mov    $0x1,%al
cmpl   $0x61,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1181 <ispunct+0x81>
xor    %eax,%eax
mov    $0x7a,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x6(%rbp)
jge    117b <ispunct+0x7b>
cmpl   $0x7f,-0x4(%rbp)
setl   %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ispunct>:
movd   %edi,%xmm0
pshufd $0x0,%xmm0,%xmm0
paddd  0xeef(%rip),%xmm0
pxor   0xef7(%rip),%xmm0
movdqa 0xeff(%rip),%xmm1
pcmpgtd %xmm0,%xmm1
movmskps %xmm1,%ecx
xor    %eax,%eax
test   %ecx,%ecx
setne  %al
ret

LLVM IR (-O0):
define i32 @ispunct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 32, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 48
br i1 %7, label %28, label %8
8: ; preds = %5, %1
%9 = load i32, i32* %2
%10 = icmp slt i32 57, %9
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp slt i32 %12, 65
br i1 %13, label %28, label %14
14: ; preds = %11, %8
%15 = load i32, i32* %2
%16 = icmp slt i32 90, %15
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp slt i32 %18, 97
br i1 %19, label %28, label %20
20: ; preds = %17, %14
%21 = load i32, i32* %2
%22 = icmp slt i32 122, %21
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load i32, i32* %2
%25 = icmp slt i32 %24, 127
br label %26
26: ; preds = %23, %20
%27 = phi i1 [ false, %20 ], [ %25, %23 ]
br label %28
28: ; preds = %26, %17, %11, %5
%29 = phi i1 [ true, %17 ], [ true, %11 ], [ true, %5 ], [ %27, %26 ]
%30 = zext i1 %29 to i32
ret i32 %30
}

LLVM IR (-O2):
define i32 @ispunct(i32 %0) {
%2 = insertelement <4 x i32> poison, i32 %0, i64 0
%3 = shufflevector <4 x i32> %2, <4 x i32> poison, <4 x i32> zeroinitializer
%4 = add <4 x i32> %3, <i32 -123, i32 -91, i32 -33, i32 -58>
%5 = icmp ult <4 x i32> %4, <i32 4, i32 6, i32 15, i32 7>
%6 = bitcast <4 x i1> %5 to i4
%7 = icmp ne i4 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int playagain(void) {
  char input[50];
  printf("\nDo you want to play again? (y\\n) ");
  scanf("%s", input);
  if ((input[0] == 'y') || (input[0] == 'Y'))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<playagain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    -0x40(%rbp),%rsi
lea    0xee4(%rip),%rdi
call   1040 <scanf@plt>
movsbl -0x40(%rbp),%eax
cmp    $0x79,%eax
je     115e <playagain+0x3e>
movsbl -0x40(%rbp),%eax
cmp    $0x59,%eax
jne    116a <playagain+0x4a>
movl   $0x1,-0x4(%rbp)
jmp    1171 <playagain+0x51>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<playagain>:
sub    $0x38,%rsp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xeec(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%cl
and    $0xdf,%cl
xor    %eax,%eax
cmp    $0x59,%cl
sete   %al
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [35 x i8] c"\0ADo you want to play again? (y\\n) \00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @playagain() {
%1 = alloca i32
%2 = alloca [50 x i8]
%3 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 121
br i1 %9, label %15, label %10
10: ; preds = %0
%11 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 89
br i1 %14, label %15, label %16
15: ; preds = %10, %0
store i32 1, i32* %1
br label %17
16: ; preds = %10
store i32 0, i32* %1
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
@.str = [35 x i8] c"\0ADo you want to play again? (y\\n) \00"
@.str.1 = [3 x i8] c"%s\00"
define i32 @playagain() {
%1 = alloca [50 x i8]
%2 = getelementptr inbounds [50 x i8], [50 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 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), i8* %2)
%5 = load i8, i8* %2
%6 = and i8 %5, -33
%7 = icmp eq i8 %6, 89
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int f369(int *);
int f370(int *p) { return f369(p); }


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

x86 assembly (clang, -O2):
<f370>:
jmp    1030 <f369@plt>

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

LLVM IR (-O2):
define i32 @f370(i32* %0) {
%2 = tail call i32 @f369(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ mg_md5(char *, char const *, char const *,
                          int /*<<< orphan*/ *);
void generate_session_id(char *buf, const char *random, const char *user) {
  mg_md5(buf, random, user, NULL);
}


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

x86 assembly (clang, -O2):
<generate_session_id>:
xor    %ecx,%ecx
jmp    1030 <mg_md5@plt>

LLVM IR (-O0):
define void @generate_session_id(i8* %0, i8* %1, i8* %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** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i32 @mg_md5(i8* %7, i8* %8, i8* %9, i32* null)
ret void
}

LLVM IR (-O2):
define void @generate_session_id(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @mg_md5(i8* %0, i8* %1, i8* %2, i32* null)
ret void
}
float ul2f(unsigned long long a) { return (unsigned long long)a; }


x86 assembly (clang, -O0):
<ul2f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
shr    %rdx
mov    %eax,%ecx
and    $0x1,%ecx
or     %rdx,%rcx
cvtsi2ss %rcx,%xmm0
addss  %xmm0,%xmm0
cvtsi2ss %rax,%xmm1
movss  %xmm1,-0x10(%rbp)
test   %rax,%rax
movss  %xmm0,-0xc(%rbp)
js     1145 <ul2f+0x45>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ul2f>:
test   %rdi,%rdi
js     110b <ul2f+0xb>
cvtsi2ss %rdi,%xmm0
ret
mov    %rdi,%rax
shr    %rax
and    $0x1,%edi
or     %rax,%rdi
cvtsi2ss %rdi,%xmm0
addss  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @ul2f(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = uitofp i64 %3 to float
ret float %4
}

LLVM IR (-O2):
define float @ul2f(i64 %0) {
%2 = uitofp i64 %0 to float
ret float %2
}
/* Variables and functions */
char *ReturnPrintMessageTypeVal(unsigned char);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void PrintMessageTypeVal(unsigned char optype) {
  fprintf(stderr, " %s ", ReturnPrintMessageTypeVal(optype));
}


x86 assembly (clang, -O0):
<PrintMessageTypeVal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <ReturnPrintMessageTypeVal@plt>
mov    -0x8(%rbp),%edi
mov    %rax,%rdx
lea    0xeb0(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintMessageTypeVal>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
call   1030 <ReturnPrintMessageTypeVal@plt>
lea    0xeca(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [5 x i8] c" %s \00"
define void @PrintMessageTypeVal(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i32, i32* @stderr
%4 = load i8, i8* %2
%5 = call i8* @ReturnPrintMessageTypeVal(i8 zeroext %4)
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [5 x i8] c" %s \00"
define void @PrintMessageTypeVal(i8 zeroext %0) {
%2 = load i32, i32* @stderr
%3 = tail call i8* @ReturnPrintMessageTypeVal(i8 zeroext %0)
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}
unsigned short font_get_bottom(struct tff_file_hdr *tff) { return 0; }


x86 assembly (clang, -O0):
<font_get_bottom>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
movzwl %ax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.tff_file_hdr = type opaque
define zeroext i16 @font_get_bottom(%struct.tff_file_hdr* %0) {
%2 = alloca %struct.tff_file_hdr*
store %struct.tff_file_hdr* %0, %struct.tff_file_hdr** %2
ret i16 0
}

LLVM IR (-O2):
%struct.tff_file_hdr = type opaque
define zeroext i16 @font_get_bottom(%struct.tff_file_hdr* nocapture readnone %0) {
ret i16 0
}
int FUNCTION1(int x) { return x * 4; }


x86 assembly (clang, -O0):
<FUNCTION1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<FUNCTION1>:
lea    0x0(,%rdi,4),%eax
ret

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

LLVM IR (-O2):
define i32 @FUNCTION1(i32 %0) {
%2 = shl nsw i32 %0, 2
ret i32 %2
}
long kvm_hypercall0_intel(unsigned int nr) {
  long ret;
  asm volatile(".byte 0x0f,0x01,0xc1" : "=a"(ret) : "a"(nr));
  return ret;
}


x86 assembly (clang, -O0):
<kvm_hypercall0_intel>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
vmcall
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @kvm_hypercall0_intel(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i64 asm sideeffect ".byte 0x0f,0x01,0xc1", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i64 %5, i64* %3
%6 = load i64, i64* %3
ret i64 %6
}

LLVM IR (-O2):
define i64 @kvm_hypercall0_intel(i32 %0) {
%2 = tail call i64 asm sideeffect ".byte 0x0f,0x01,0xc1", "={ax},{ax},~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret i64 %2
}
int min(int aNumber, int b_int) { return b_int < aNumber ? b_int : aNumber; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1121 <min+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min+0x27>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %edi,%eax
cmp    %edi,%esi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, %0
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
struct hostent *our_gethostbyname(name)
char *name;
{
  if (!1)
    return 0;
  return (struct hostent *)gethostbyname(name);
}


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

x86 assembly (clang, -O2):
<our_gethostbyname>:
push   %rax
xor    %eax,%eax
call   1030 <gethostbyname@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
%struct.hostent = type opaque
define %struct.hostent* @our_gethostbyname(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @gethostbyname to i32 (i8*, ...)*)(i8* %3)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to %struct.hostent*
ret %struct.hostent* %6
}

LLVM IR (-O2):
%struct.hostent = type opaque
define %struct.hostent* @our_gethostbyname(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @gethostbyname to i32 (i8*, ...)*)(i8* %0)
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to %struct.hostent*
ret %struct.hostent* %4
}
void PIC16F84A_stop(void) {}


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

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

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

LLVM IR (-O2):
define void @PIC16F84A_stop() {
ret void
}
int _write_r(struct _reent *r, int file, char *ptr, int len) {
  (void)r;
  (void)file;
  (void)ptr;
  return len;
}


x86 assembly (clang, -O0):
<_write_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_write_r>:
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
%struct._reent = type opaque
define i32 @_write_r(%struct._reent* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i32 returned %3) {
ret i32 %3
}
f() {
  int j = 0;
  {
    static int i;
    i++;
    j += i;
  }
  {
    static int i;
    i++;
    j += i;
  }
  return j;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0x2f13(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2f0a(%rip)
mov    0x2f04(%rip),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    0x2efc(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ef3(%rip)
mov    0x2eed(%rip),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    0x2f1e(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f15(%rip)
mov    0x2f13(%rip),%ecx
lea    0x1(%rcx),%edx
mov    %edx,0x2f0a(%rip)
add    %ecx,%eax
add    $0x2,%eax
ret

LLVM IR (-O0):
@f.i = internal global i32 0
@f.i.1 = internal global i32 0
define i32 @f() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @f.i
%3 = add nsw i32 %2, 1
store i32 %3, i32* @f.i
%4 = load i32, i32* @f.i
%5 = load i32, i32* %1
%6 = add nsw i32 %5, %4
store i32 %6, i32* %1
%7 = load i32, i32* @f.i.1
%8 = add nsw i32 %7, 1
store i32 %8, i32* @f.i.1
%9 = load i32, i32* @f.i.1
%10 = load i32, i32* %1
%11 = add nsw i32 %10, %9
store i32 %11, i32* %1
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@f.i = internal unnamed_addr global i32 0
@f.i.1 = internal unnamed_addr global i32 0
define i32 @f() {
%1 = load i32, i32* @f.i
%2 = add nsw i32 %1, 1
store i32 %2, i32* @f.i
%3 = load i32, i32* @f.i.1
%4 = add nsw i32 %3, 1
store i32 %4, i32* @f.i.1
%5 = add nsw i32 %4, %2
ret i32 %5
}
void RTAvlrUIntPtrGetBestFit(void) {}


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

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

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

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


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_2_1_2_2_1_1() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fatal_error(int /*<<< orphan*/, char *, char *, char *, int);
void gmx_tx_rx(int send_nodeid, void *send_buf, int send_bufsize,
               int rec_nodeid, void *rec_buf, int rec_bufsize) {
  fatal_error(0, "Routine %s called in %s, %d", "gmx_tx_rx",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/"
              "tests/test_07/network.c",
              242);
}


x86 assembly (clang, -O0):
<gmx_tx_rx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
xor    %edi,%edi
lea    0xeca(%rip),%rsi
lea    0xedf(%rip),%rdx
lea    0xee2(%rip),%rcx
mov    $0xf2,%r8d
call   1030 <fatal_error@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmx_tx_rx>:
lea    0xee9(%rip),%rsi
lea    0xefe(%rip),%rdx
lea    0xf01(%rip),%rcx
xor    %edi,%edi
mov    $0xf2,%r8d
jmp    1030 <fatal_error@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Routine %s called in %s, %d\00"
@.str.1 = [10 x i8] c"gmx_tx_rx\00"
@.str.2 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/tests/test_07/network.c\00"
define void @gmx_tx_rx(i32 %0, i8* %1, i32 %2, i32 %3, i8* %4, i32 %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
store i32 %0, i32* %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i32 %3, i32* %10
store i8* %4, i8** %11
store i32 %5, i32* %12
%13 = call i32 @fatal_error(i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.2, i64 0, i64 0), i32 242)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Routine %s called in %s, %d\00"
@.str.1 = [10 x i8] c"gmx_tx_rx\00"
@.str.2 = [148 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Chadi-akel/cere/refs/heads/master/tests/test_07/network.c\00"
define void @gmx_tx_rx(i32 %0, i8* nocapture readnone %1, i32 %2, i32 %3, i8* nocapture readnone %4, i32 %5) {
%7 = tail call i32 @fatal_error(i32 0, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([148 x i8], [148 x i8]* @.str.2, i64 0, i64 0), i32 242)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ banner(char *);
int /*<<< orphan*/ cpuinfo();
int /*<<< orphan*/ dev_random(int);
int /*<<< orphan*/ dev_zero(int);
int main(int argc, char **argv) {
  banner("try to read from /dev/random");
  dev_random(16);
  banner("try to read from /dev/zero");
  dev_zero(16);
  banner("try to read cpu info");
  cpuinfo();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeaa(%rip),%rdi
call   1050 <banner@plt>
mov    $0x10,%edi
call   1040 <dev_random@plt>
lea    0xeb1(%rip),%rdi
call   1050 <banner@plt>
mov    $0x10,%edi
call   1060 <dev_zero@plt>
lea    0xeb6(%rip),%rdi
call   1050 <banner@plt>
mov    $0x0,%al
call   1030 <cpuinfo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1050 <banner@plt>
mov    $0x10,%edi
call   1040 <dev_random@plt>
lea    0xebf(%rip),%rdi
call   1050 <banner@plt>
mov    $0x10,%edi
call   1060 <dev_zero@plt>
lea    0xec4(%rip),%rdi
call   1050 <banner@plt>
xor    %eax,%eax
call   1030 <cpuinfo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"try to read from /dev/random\00"
@.str.1 = [27 x i8] c"try to read from /dev/zero\00"
@.str.2 = [21 x i8] c"try to read cpu info\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @banner(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @dev_random(i32 16)
%7 = call i32 @banner(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @dev_zero(i32 16)
%9 = call i32 @banner(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (...) @cpuinfo()
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"try to read from /dev/random\00"
@.str.1 = [27 x i8] c"try to read from /dev/zero\00"
@.str.2 = [21 x i8] c"try to read cpu info\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @banner(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @dev_random(i32 16)
%5 = tail call i32 @banner(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @dev_zero(i32 16)
%7 = tail call i32 @banner(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 (...) @cpuinfo()
ret i32 0
}
/* Variables and functions */
int base64_decode(char *, int /*<<< orphan*/, char *, size_t *, int);
int /*<<< orphan*/ strlen(char *);
int codec_supported(int flags) {
  char *a = "aGVsbG8=";
  char b[10];
  size_t outlen;
  return (base64_decode(a, strlen(a), b, &outlen, flags) != -1);
}


x86 assembly (clang, -O0):
<codec_supported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    %eax,%esi
lea    -0x1a(%rbp),%rdx
mov    -0x4(%rbp),%r8d
lea    -0x28(%rbp),%rcx
call   1040 <base64_decode@plt>
cmp    $0xffffffff,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<codec_supported>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebx
lea    0xed0(%rip),%r14
mov    %r14,%rdi
call   1030 <strlen@plt>
lea    0xe(%rsp),%rdx
mov    %rsp,%rcx
mov    %r14,%rdi
mov    %eax,%esi
mov    %ebx,%r8d
call   1040 <base64_decode@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"aGVsbG8=\00"
define i32 @codec_supported(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca [10 x i8]
%5 = alloca i64
store i32 %0, i32* %2
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %3
%6 = load i8*, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%10 = load i32, i32* %2
%11 = call i32 @base64_decode(i8* %6, i32 %8, i8* %9, i64* %5, i32 %10)
%12 = icmp ne i32 %11, -1
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@.str = [9 x i8] c"aGVsbG8=\00"
define i32 @codec_supported(i32 %0) {
%2 = alloca [10 x i8]
%3 = alloca i64
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%5 = bitcast i64* %3 to i8*
%6 = tail call i32 @strlen(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @base64_decode(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %6, i8* %4, i64* %3, i32 %0)
%8 = icmp ne i32 %7, -1
%9 = zext i1 %8 to i32
ret i32 %9
}
int getNumberOfSevenBits(int num) {
  int count = 0;
  while (num > 0) {
    count++;
    num = num >> 7;
  }
  return count;
}


x86 assembly (clang, -O0):
<getNumberOfSevenBits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    112f <getNumberOfSevenBits+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x7,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <getNumberOfSevenBits+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNumberOfSevenBits>:
xor    %eax,%eax
test   %edi,%edi
jle    111d <getNumberOfSevenBits+0x1d>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
add    $0x1,%eax
shr    $0x7,%ecx
cmp    $0x7f,%edi
mov    %ecx,%edi
ja     1110 <getNumberOfSevenBits+0x10>
ret

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

LLVM IR (-O2):
define i32 @getNumberOfSevenBits(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = lshr i32 %5, 7
%8 = icmp ult i32 %5, 128
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ qd_add(double const *, double *, double *);
int /*<<< orphan*/ qd_copy(double const *, double *);
int /*<<< orphan*/ qd_minus(double *);
void qd_sub(const double *a, const double *b, double *c) {
  double mb[4];
  qd_copy(b, mb);
  qd_minus(mb);
  qd_add(a, mb, c);
}


x86 assembly (clang, -O0):
<qd_sub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1050 <qd_copy@plt>
lea    -0x40(%rbp),%rdi
call   1030 <qd_minus@plt>
mov    -0x8(%rbp),%rdi
lea    -0x40(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1040 <qd_add@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qd_sub>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rdx,%r14
mov    %rdi,%r15
mov    %rsp,%rbx
mov    %rsi,%rdi
mov    %rbx,%rsi
call   1050 <qd_copy@plt>
mov    %rbx,%rdi
call   1030 <qd_minus@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1040 <qd_add@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @qd_sub(double* %0, double* %1, double* %2) {
%4 = alloca [4 x double]
%5 = bitcast [4 x double]* %4 to i8*
%6 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%7 = call i32 @qd_copy(double* %1, double* %6)
%8 = call i32 @qd_minus(double* %6)
%9 = call i32 @qd_add(double* %0, double* %6, double* %2)
ret void
}
int check_mmx_support(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @check_mmx_support() {
ret i32 1
}

LLVM IR (-O2):
define i32 @check_mmx_support() {
ret i32 1
}
int isPower2(int x) { return !((x & (x + (~0))) | ((!x) | (x >> 31))); }


x86 assembly (clang, -O0):
<isPower2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
add    $0xffffffff,%ecx
and    %ecx,%eax
cmpl   $0x0,-0x4(%rbp)
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    -0x4(%rbp),%edx
sar    $0x1f,%edx
or     %edx,%ecx
or     %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isPower2>:
xor    %eax,%eax
mov    %edi,%ecx
sub    $0x1,%ecx
setb   %al
and    %edi,%ecx
sar    $0x1f,%edi
or     %eax,%edi
xor    %eax,%eax
or     %ecx,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isPower2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
%6 = and i32 %3, %5
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
%11 = load i32, i32* %2
%12 = ashr i32 %11, 31
%13 = or i32 %10, %12
%14 = or i32 %6, %13
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @isPower2(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = and i32 %2, %0
%4 = icmp eq i32 %0, 0
%5 = zext i1 %4 to i32
%6 = ashr i32 %0, 31
%7 = or i32 %6, %5
%8 = or i32 %7, %3
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
int exe$update(struct _fab *fab, void *err, void *suc) {
  printk("not implemented\n");
}


x86 assembly (clang, -O0):
<exe$update>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printk@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exe$update>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printk@plt>

LLVM IR (-O0):
%struct._fab = type opaque
@.str = [17 x i8] c"not implemented\0A\00"
define i32 @"exe$update"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct._fab*
%6 = alloca i8*
%7 = alloca i8*
store %struct._fab* %0, %struct._fab** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @printk to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* %4
ret i32 %9
}

LLVM IR (-O2):
%struct._fab = type opaque
@.str = [17 x i8] c"not implemented\0A\00"
define i32 @"exe$update"(%struct._fab* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @printk to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
void tVUTContextInfo(void) {}


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

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

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

LLVM IR (-O2):
define void @tVUTContextInfo() {
ret void
}
__attribute__((always_)) void __rcu_read_unlock(void) {
  do {
  } while (0);
}


x86 assembly (clang, -O0):
<__rcu_read_unlock>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <__rcu_read_unlock+0x9>
jmp    110e <__rcu_read_unlock+0xe>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @__rcu_read_unlock() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @__rcu_read_unlock() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xd0() {
  Assert_real((isprint(208) == 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_isprint.c",
              1045, ("isprint should be 0 for 0xd0"));
}


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

x86 assembly (clang, -O2):
<t_isprint_0xd0>:
push   %rax
mov    $0xd0,%edi
call   1030 <isprint@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x415,%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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xd0\00"
define void @t_isprint_0xd0() {
%1 = call i64 @isprint(i32 208)
%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 1045, 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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xd0\00"
define void @t_isprint_0xd0() {
%1 = tail call i64 @isprint(i32 208)
%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 1045, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int /*<<< orphan*/ ref();
void _start() {
  foo();
  ref();
}


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

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

LLVM IR (-O0):
define void @_start() {
%1 = call i32 (...) @foo()
%2 = call i32 (...) @ref()
ret void
}

LLVM IR (-O2):
define void @_start() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 (...) @ref()
ret void
}