xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("hello, world!\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%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 = [15 x i8] c"hello, world!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [14 x i8] c"hello, world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret i32 0
}
signed int Thrd_Get_Long(signed int t) {
  signed int i;
  i = Thrd_Get_Word(t);
  signed int return_value_Thrd_Get_Word$1;
  return_value_Thrd_Get_Word$1 = Thrd_Get_Word(t);
  return i << 16 | return_value_Thrd_Get_Word$1;
}


x86 assembly (clang, -O0):
<Thrd_Get_Long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <Thrd_Get_Word@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <Thrd_Get_Word@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x10,%eax
or     -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Thrd_Get_Long>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <Thrd_Get_Word@plt>
mov    %eax,%ebp
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <Thrd_Get_Word@plt>
shl    $0x10,%ebp
or     %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @Thrd_Get_Long(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 (i32, ...) bitcast (i32 (...)* @Thrd_Get_Word to i32 (i32, ...)*)(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = call i32 (i32, ...) bitcast (i32 (...)* @Thrd_Get_Word to i32 (i32, ...)*)(i32 %7)
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = shl i32 %9, 16
%11 = load i32, i32* %4
%12 = or i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @Thrd_Get_Long(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @Thrd_Get_Word to i32 (i32, ...)*)(i32 %0)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @Thrd_Get_Word to i32 (i32, ...)*)(i32 %0)
%4 = shl i32 %2, 16
%5 = or i32 %4, %3
ret i32 %5
}
void a_spin() { __asm__ __volatile__("pause" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @a_spin() {
tail call void asm sideeffect "pause", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int SerialAPI_request(unsigned char *, int);
int ZW_RFPowerLevelSet(int v) {
  unsigned char buf[255];
  buf[0] = 0x00;
  buf[1] = 0x17;
  buf[2] = v;
  return SerialAPI_request(buf, 3);
}


x86 assembly (clang, -O0):
<ZW_RFPowerLevelSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
movb   $0x0,-0x110(%rbp)
movb   $0x17,-0x10f(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x10e(%rbp)
lea    -0x110(%rbp),%rdi
mov    $0x3,%esi
call   1030 <SerialAPI_request@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZW_RFPowerLevelSet>:
sub    $0x108,%rsp
movw   $0x1700,(%rsp)
mov    %dil,0x2(%rsp)
mov    %rsp,%rdi
mov    $0x3,%esi
call   1030 <SerialAPI_request@plt>
add    $0x108,%rsp
ret

LLVM IR (-O0):
define i32 @ZW_RFPowerLevelSet(i32 %0) {
%2 = alloca i32
%3 = alloca [255 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
store i8 0, i8* %4
%5 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 1
store i8 23, i8* %5
%6 = load i32, i32* %2
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 2
store i8 %7, i8* %8
%9 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%10 = call i32 @SerialAPI_request(i8* %9, i32 3)
ret i32 %10
}

LLVM IR (-O2):
define i32 @ZW_RFPowerLevelSet(i32 %0) {
%2 = alloca [255 x i8]
%3 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
store i8 0, i8* %3
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 1
store i8 23, i8* %4
%5 = trunc i32 %0 to i8
%6 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 2
store i8 %5, i8* %6
%7 = call i32 @SerialAPI_request(i8* %3, i32 3)
ret i32 %7
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long font;
};
typedef TYPE_1__ XTextItem;

/* Variables and functions */
void set_XTextItem_font(void *_p, unsigned long _v) {
  ((XTextItem *)_p)->font = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XTextItem_font>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XTextItem_font(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XTextItem_font(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ printw(char *);
int main() {
  initscr();
  noecho();
  printw("butts (‿ˠ‿)\n");
  endwin();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <initscr@plt>
mov    $0x0,%al
call   1060 <noecho@plt>
lea    0xe9c(%rip),%rdi
call   1040 <printw@plt>
mov    $0x0,%al
call   1050 <endwin@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <initscr@plt>
xor    %eax,%eax
call   1060 <noecho@plt>
lea    0xeaa(%rip),%rdi
call   1040 <printw@plt>
xor    %eax,%eax
call   1050 <endwin@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"butts (\E2\80\BF\CB\A0\E2\80\BF)\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @initscr()
%3 = call i32 (...) @noecho()
%4 = call i32 @printw(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%5 = call i32 (...) @endwin()
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"butts (\E2\80\BF\CB\A0\E2\80\BF)\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @noecho()
%3 = tail call i32 @printw(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @endwin()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  int i = 1, j = 2, m = 2;
  if (i == 0)
    if (j == 1)
      printf("j==1\n");
    else
      printf("j!=1\n");
  else
    printf("i != 0\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x2,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    116a <main+0x5a>
cmpl   $0x1,-0xc(%rbp)
jne    1159 <main+0x49>
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
jmp    1165 <main+0x55>
lea    0xea6(%rip),%rdi
call   1030 <printf@plt>
jmp    1176 <main+0x66>
lea    0xe9b(%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 = [6 x i8] c"j==1\0A\00"
@.str.1 = [6 x i8] c"j!=1\0A\00"
@.str.2 = [8 x i8] c"i != 0\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 2, i32* %3
store i32 2, i32* %4
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %0
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %14
12: ; preds = %7
%13 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %10
br label %17
15: ; preds = %0
%16 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
br label %17
17: ; preds = %15, %14
ret i32 0
}

LLVM IR (-O2):
@str = [7 x i8] c"i != 0\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int reset_tree(struct huffman *huffman) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.huffman = type opaque
define i32 @reset_tree(%struct.huffman* nocapture readnone %0) {
ret i32 0
}
char path_separator() { return '/'; }


x86 assembly (clang, -O0):
<path_separator>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2f,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<path_separator>:
mov    $0x2f,%al
ret

LLVM IR (-O0):
define signext i8 @path_separator() {
ret i8 47
}

LLVM IR (-O2):
define signext i8 @path_separator() {
ret i8 47
}
void RTLogSetBuffering(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLogSetBuffering() {
ret void
}
void ClearSourceOnOff(unsigned char *pbSrcOnOff) {
  if (pbSrcOnOff == ((void *)0)) {
  } else {
    pbSrcOnOff[0] = ((0x02) | (0x08) | (0x20));
    pbSrcOnOff[1] = ((0x02) | (0x08) | (0x20));
    pbSrcOnOff[2] = ((0x02) | (0x08) | (0x20));
    pbSrcOnOff[3] = ((0x02) | (0x08) | (0x20) | (0x80));
    pbSrcOnOff[4] = ((0x02) | (0x08) | (0x20) | (0x80));
    pbSrcOnOff[5] = ((0x02) | (0x08) | (0x20));
    pbSrcOnOff[6] = ((0x02) | (0x08) | (0x20) | (0x80));
  }
}


x86 assembly (clang, -O0):
<ClearSourceOnOff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1118 <ClearSourceOnOff+0x18>
jmp    114f <ClearSourceOnOff+0x4f>
mov    -0x8(%rbp),%rax
movb   $0x2a,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x2a,0x1(%rax)
mov    -0x8(%rbp),%rax
movb   $0x2a,0x2(%rax)
mov    -0x8(%rbp),%rax
movb   $0xaa,0x3(%rax)
mov    -0x8(%rbp),%rax
movb   $0xaa,0x4(%rax)
mov    -0x8(%rbp),%rax
movb   $0x2a,0x5(%rax)
mov    -0x8(%rbp),%rax
movb   $0xaa,0x6(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearSourceOnOff>:
test   %rdi,%rdi
je     1115 <ClearSourceOnOff+0x15>
movl   $0xaa2a2a2a,(%rdi)
movw   $0x2aaa,0x4(%rdi)
movb   $0xaa,0x6(%rdi)
ret

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

LLVM IR (-O2):
define void @ClearSourceOnOff(i8* writeonly %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
store i8 42, i8* %0
%4 = getelementptr inbounds i8, i8* %0, i64 1
store i8 42, i8* %4
%5 = getelementptr inbounds i8, i8* %0, i64 2
store i8 42, i8* %5
%6 = getelementptr inbounds i8, i8* %0, i64 3
store i8 -86, i8* %6
%7 = getelementptr inbounds i8, i8* %0, i64 4
store i8 -86, i8* %7
%8 = getelementptr inbounds i8, i8* %0, i64 5
store i8 42, i8* %8
%9 = getelementptr inbounds i8, i8* %0, i64 6
store i8 -86, i8* %9
br label %10
10: ; preds = %1, %3
ret void
}
/* Variables and functions */
scalar_t__ gfx_inw(int);
int /*<<< orphan*/ gfx_outw(int, int);
unsigned long gu2_get_core_freq(void) {
  unsigned long value;
  gfx_outw(0xAC1C, 0xFC53);
  gfx_outw(0xAC1C, 0x1201);
  value = (unsigned long)(gfx_inw(0xAC1E));
  return (value);
}


x86 assembly (clang, -O0):
<gu2_get_core_freq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xac1c,%edi
mov    $0xfc53,%esi
call   1040 <gfx_outw@plt>
mov    $0xac1c,%edi
mov    $0x1201,%esi
call   1040 <gfx_outw@plt>
mov    $0xac1e,%edi
call   1030 <gfx_inw@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gu2_get_core_freq>:
push   %rax
mov    $0xac1c,%edi
mov    $0xfc53,%esi
call   1040 <gfx_outw@plt>
mov    $0xac1c,%edi
mov    $0x1201,%esi
call   1040 <gfx_outw@plt>
mov    $0xac1e,%edi
pop    %rax
jmp    1030 <gfx_inw@plt>

LLVM IR (-O0):
define i64 @gu2_get_core_freq() {
%1 = alloca i64
%2 = call i32 @gfx_outw(i32 44060, i32 64595)
%3 = call i32 @gfx_outw(i32 44060, i32 4609)
%4 = call i64 @gfx_inw(i32 44062)
store i64 %4, i64* %1
%5 = load i64, i64* %1
ret i64 %5
}

LLVM IR (-O2):
define i64 @gu2_get_core_freq() {
%1 = tail call i32 @gfx_outw(i32 44060, i32 64595)
%2 = tail call i32 @gfx_outw(i32 44060, i32 4609)
%3 = tail call i64 @gfx_inw(i32 44062)
ret i64 %3
}
unsigned int G(unsigned int X, unsigned int Y, unsigned int Z) {
  return (X & Z) | (Y & ~Z);
}


x86 assembly (clang, -O0):
<G>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<G>:
mov    %edi,%eax
xor    %esi,%eax
and    %edx,%eax
xor    %esi,%eax
ret

LLVM IR (-O0):
define i32 @G(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %6
%9 = and i32 %7, %8
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = xor i32 %11, -1
%13 = and i32 %10, %12
%14 = or i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @G(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %2, %0
%5 = xor i32 %2, -1
%6 = and i32 %5, %1
%7 = or i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int syscall(int, void *, size_t, int);
int mprotect(void *addr, size_t len, int prot) {
  return syscall(125, addr, len, prot);
}


x86 assembly (clang, -O0):
<mprotect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x7d,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mprotect>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x7d,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @mprotect(i8* %0, i64 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i32, i32* %6
%10 = call i32 @syscall(i32 125, i8* %7, i64 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @mprotect(i8* %0, i64 %1, i32 %2) {
%4 = tail call i32 @syscall(i32 125, i8* %0, i64 %1, i32 %2)
ret i32 %4
}
int fn3(int n) { return ((1 << n) & 1) == 0; }


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

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

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

LLVM IR (-O2):
define i32 @fn3(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ w836xx_memw_enable(int);
int w836xx_memw_enable_2e(void) {
  w836xx_memw_enable(0x2E);
  return 0;
}


x86 assembly (clang, -O0):
<w836xx_memw_enable_2e>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2e,%edi
call   1030 <w836xx_memw_enable@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<w836xx_memw_enable_2e>:
push   %rax
mov    $0x2e,%edi
call   1030 <w836xx_memw_enable@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @w836xx_memw_enable_2e() {
%1 = call i32 @w836xx_memw_enable(i32 46)
ret i32 0
}

LLVM IR (-O2):
define i32 @w836xx_memw_enable_2e() {
%1 = tail call i32 @w836xx_memw_enable(i32 46)
ret i32 0
}
/* Type definitions */
struct extent_buffer {
  int dummy;
};
struct btrfs_header {
  int dummy;
};

/* Variables and functions */
struct btrfs_header *btrfs_buffer_header(struct extent_buffer *eb) {
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.btrfs_header = type { i32 }
%struct.extent_buffer = type { i32 }
define %struct.btrfs_header* @btrfs_buffer_header(%struct.extent_buffer* %0) {
%2 = alloca %struct.extent_buffer*
store %struct.extent_buffer* %0, %struct.extent_buffer** %2
ret %struct.btrfs_header* null
}

LLVM IR (-O2):
%struct.btrfs_header = type { i32 }
%struct.extent_buffer = type { i32 }
define noalias %struct.btrfs_header* @btrfs_buffer_header(%struct.extent_buffer* nocapture readnone %0) {
ret %struct.btrfs_header* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int b = 5;
  int *a = &b;
  printf("%p\n", a);
  printf("%d\n", *a);
  printf("%d", b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x5,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
lea    0xeb1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x5,0x4(%rsp)
lea    0xee0(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x4(%rsp),%esi
lea    0xebf(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%p\0A\00"
@.str.1 = [4 x i8] c"%d\0A\00"
@.str.2 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 5, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = load i32, i32* %1
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn(
        "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
        "2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/"
        "genfiles/new_control_flow.c",
        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [157 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/new_control_flow.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [157 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/new_control_flow.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([157 x i8], [157 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ getfloat(float *);
int /*<<< orphan*/ printf(char *, float);
int main(void) {
  float n;
  getfloat(&n);
  printf("%.4f\n", n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <getfloat@plt>
movss  -0x8(%rbp),%xmm0
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <getfloat@plt>
movss  0x4(%rsp),%xmm0
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%.4f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = call i32 @getfloat(float* %1)
%4 = load float, float* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo(float *);
int main() {
  float x[4];
  foo(x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    %rsp,%rdi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x float]
store i32 0, i32* %1
%3 = getelementptr inbounds [4 x float], [4 x float]* %2, i64 0, i64 0
%4 = call i32 @foo(float* %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [4 x float]
%2 = bitcast [4 x float]* %1 to i8*
%3 = getelementptr inbounds [4 x float], [4 x float]* %1, i64 0, i64 0
%4 = call i32 @foo(float* %3)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
char *uint32_marshall(void *obj) {
  uint32_t u;
  static char buf[64];
  uint32_t i;
  u = *(uint32_t *)obj;
  for (i = 0; i < sizeof(uint32_t); ++i)
    buf[i] = *(((char *)&u) + i);
  return buf;
}


x86 assembly (clang, -O0):
<uint32_marshall>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movslq -0x10(%rbp),%rax
cmp    $0x4,%rax
jae    114a <uint32_marshall+0x4a>
movslq -0x10(%rbp),%rax
mov    -0xc(%rbp,%rax,1),%dl
movslq -0x10(%rbp),%rcx
lea    0x2ef7(%rip),%rax
mov    %dl,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1118 <uint32_marshall+0x18>
lea    0x2edf(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint32_marshall>:
mov    (%rdi),%eax
mov    %eax,0x2f28(%rip)
lea    0x2f21(%rip),%rax
ret

LLVM IR (-O0):
@uint32_marshall.buf = internal global [64 x i8] zeroinitializer
define i8* @uint32_marshall(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
store i32 %7, i32* %3
store i32 0, i32* %4
br label %8
8: ; preds = %21, %1
%9 = load i32, i32* %4
%10 = sext i32 %9 to i64
%11 = icmp ult i64 %10, 4
br i1 %11, label %12, label %24
12: ; preds = %8
%13 = bitcast i32* %3 to i8*
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [64 x i8], [64 x i8]* @uint32_marshall.buf, i64 0, i64 %19
store i8 %17, i8* %20
br label %21
21: ; preds = %12
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %8
24: ; preds = %8
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @uint32_marshall.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@uint32_marshall.buf = internal global [64 x i8] zeroinitializer
define i8* @uint32_marshall(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
store i32 %3, i32* bitcast ([64 x i8]* @uint32_marshall.buf to i32*)
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @uint32_marshall.buf, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int /*<<< orphan*/);
int __VERIFIER_nondet_uint();
int main(void) {
  int a = __VERIFIER_nondet_uint();
  if (a < 10) {
    __VERIFIER_assert(0);
  }
  return a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_uint@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    114a <main+0x2a>
xor    %edi,%edi
call   1030 <__VERIFIER_assert@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_uint@plt>
mov    %eax,%ebx
cmp    $0x9,%eax
jg     1136 <main+0x16>
xor    %edi,%edi
call   1030 <__VERIFIER_assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_uint()
%2 = icmp slt i32 %1, 10
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @__VERIFIER_assert(i32 0)
br label %5
5: ; preds = %3, %0
ret i32 %1
}
/* Variables and functions */
int LOG_DEBUG;
int LOG_ERR;
int LOG_INFO;
int LOG_WARNING;
int log_level_to_syslog(unsigned int level) {
  switch (level) {
  case 0:
    return LOG_ERR;
  case 1:
    return LOG_WARNING;
  case 2:
  case 3:
    return LOG_INFO;
  default:
    return LOG_DEBUG;
  }
}


x86 assembly (clang, -O0):
<log_level_to_syslog>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
test   %eax,%eax
je     113f <log_level_to_syslog+0x3f>
jmp    111a <log_level_to_syslog+0x1a>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
je     1150 <log_level_to_syslog+0x50>
jmp    112b <log_level_to_syslog+0x2b>
mov    -0xc(%rbp),%eax
add    $0xfffffffe,%eax
sub    $0x2,%eax
jb     1161 <log_level_to_syslog+0x61>
jmp    1172 <log_level_to_syslog+0x72>
mov    0x2e7a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    117e <log_level_to_syslog+0x7e>
mov    0x2e91(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    117e <log_level_to_syslog+0x7e>
mov    0x2e68(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    117e <log_level_to_syslog+0x7e>
mov    0x2e5f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_level_to_syslog>:
cmp    $0x3,%edi
ja     1116 <log_level_to_syslog+0x16>
movslq %edi,%rax
lea    0x2d19(%rip),%rcx
mov    (%rcx,%rax,8),%rax
mov    (%rax),%eax
ret
mov    0x2ec3(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@LOG_ERR = global i32 0
@LOG_WARNING = global i32 0
@LOG_INFO = global i32 0
@LOG_DEBUG = global i32 0
define i32 @log_level_to_syslog(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %11 [
i32 0, label %5
i32 1, label %7
i32 2, label %9
i32 3, label %9
]
5: ; preds = %1
%6 = load i32, i32* @LOG_ERR
store i32 %6, i32* %2
br label %13
7: ; preds = %1
%8 = load i32, i32* @LOG_WARNING
store i32 %8, i32* %2
br label %13
9: ; preds = %1, %1
%10 = load i32, i32* @LOG_INFO
store i32 %10, i32* %2
br label %13
11: ; preds = %1
%12 = load i32, i32* @LOG_DEBUG
store i32 %12, i32* %2
br label %13
13: ; preds = %11, %9, %7, %5
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@LOG_WARNING = global i32 0
@LOG_INFO = global i32 0
@LOG_DEBUG = global i32 0
@switch.table.log_level_to_syslog = [4 x i32*] [i32* @LOG_ERR, i32* @LOG_WARNING, i32* @LOG_INFO, i32* @LOG_INFO]
define i32 @log_level_to_syslog(i32 %0) {
%2 = icmp ult i32 %0, 4
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds [4 x i32*], [4 x i32*]* @switch.table.log_level_to_syslog, i64 0, i64 %4
%6 = load i32*, i32** %5
br label %7
7: ; preds = %1, %3
%8 = phi i32* [ %6, %3 ], [ @LOG_DEBUG, %1 ]
%9 = load i32, i32* %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xdb() {
  Assert_real((isascii(219) == 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_isascii.c",
              1100, ("isascii should be 0 for 0xdb"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xdb>:
push   %rax
mov    $0xdb,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x44c,%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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xdb\00"
define void @t_isascii_0xdb() {
%1 = call i64 @isascii(i32 219)
%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 1100, 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_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xdb\00"
define void @t_isascii_0xdb() {
%1 = tail call i64 @isascii(i32 219)
%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 1100, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ readAsBinary(char *);
char *readFile(char *);
int main(void) {
  printf("hello world!\n");
  char *string = readFile("test.txt");
  readAsBinary("test.txt");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
call   1050 <readFile@plt>
mov    %rax,-0x8(%rbp)
lea    0xeb3(%rip),%rdi
call   1040 <readAsBinary@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rbx
mov    %rbx,%rdi
call   1050 <readFile@plt>
mov    %rbx,%rdi
call   1040 <readAsBinary@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"hello world!\0A\00"
@.str.1 = [9 x i8] c"test.txt\00"
define i32 @main() {
%1 = alloca i8*
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i8* @readFile(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
store i8* %3, i8** %1
%4 = call i32 @readAsBinary(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [9 x i8] c"test.txt\00"
@str = [13 x i8] c"hello world!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%2 = tail call i8* @readFile(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @readAsBinary(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
int compute_fill_cycles(int left_partials, int right_partials, int full_words,
                        int op_timing) {
  int dstwords;
  if (left_partials)
    full_words += 1;
  if (right_partials)
    full_words += 1;
  dstwords = full_words;
  return (dstwords * op_timing);
}


x86 assembly (clang, -O0):
<compute_fill_cycles>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1123 <compute_fill_cycles+0x23>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1136 <compute_fill_cycles+0x36>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
imul   -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_fill_cycles>:
mov    %edx,%eax
cmp    $0x1,%edi
sbb    $0xffffffff,%eax
cmp    $0x1,%esi
sbb    $0xffffffff,%eax
imul   %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @compute_fill_cycles(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp ne i32 %0, 0
%6 = zext i1 %5 to i32
%7 = add nsw i32 %6, %2
%8 = icmp ne i32 %1, 0
%9 = zext i1 %8 to i32
%10 = add nsw i32 %7, %9
%11 = mul nsw i32 %10, %3
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ VIM_SIF_I2cReadByte(unsigned char, unsigned char *);
void SensorGetReg_GC306(unsigned char uAddr, unsigned short *uVal) {
  VIM_SIF_I2cReadByte((unsigned char)uAddr, (unsigned char *)uVal);
}


x86 assembly (clang, -O0):
<SensorGetReg_GC306>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1030 <VIM_SIF_I2cReadByte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SensorGetReg_GC306>:
jmp    1030 <VIM_SIF_I2cReadByte@plt>

LLVM IR (-O0):
define void @SensorGetReg_GC306(i8 zeroext %0, i16* %1) {
%3 = alloca i8
%4 = alloca i16*
store i8 %0, i8* %3
store i16* %1, i16** %4
%5 = load i8, i8* %3
%6 = load i16*, i16** %4
%7 = bitcast i16* %6 to i8*
%8 = call i32 @VIM_SIF_I2cReadByte(i8 zeroext %5, i8* %7)
ret void
}

LLVM IR (-O2):
define void @SensorGetReg_GC306(i8 zeroext %0, i16* %1) {
%3 = bitcast i16* %1 to i8*
%4 = tail call i32 @VIM_SIF_I2cReadByte(i8 zeroext %0, i8* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgls_fopen(char const *, char const *);
int /*<<< orphan*/ sync_read(double *, int /*<<< orphan*/ *, size_t,
                             int /*<<< orphan*/);
void load_file(const char *path, const char *mode, double *buff, size_t size) {
  FILE *fp;
  fp = fgls_fopen(path, mode);
  sync_read(buff, fp, size, 0);
  fclose(fp);
}


x86 assembly (clang, -O0):
<load_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <fgls_fopen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x20(%rbp),%rdx
xor    %ecx,%ecx
call   1040 <sync_read@plt>
mov    -0x28(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_file>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%r15
call   1050 <fgls_fopen@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %rax,%rsi
mov    %r14,%rdx
xor    %ecx,%ecx
call   1040 <sync_read@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <fclose@plt>

LLVM IR (-O0):
define void @load_file(i8* %0, i8* %1, double* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca double*
%8 = alloca i64
%9 = alloca i32*
store i8* %0, i8** %5
store i8* %1, i8** %6
store double* %2, double** %7
store i64 %3, i64* %8
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = call i32* @fgls_fopen(i8* %10, i8* %11)
store i32* %12, i32** %9
%13 = load double*, double** %7
%14 = load i32*, i32** %9
%15 = load i64, i64* %8
%16 = call i32 @sync_read(double* %13, i32* %14, i64 %15, i32 0)
%17 = load i32*, i32** %9
%18 = call i32 @fclose(i32* %17)
ret void
}

LLVM IR (-O2):
define void @load_file(i8* %0, i8* %1, double* %2, i64 %3) {
%5 = tail call i32* @fgls_fopen(i8* %0, i8* %1)
%6 = tail call i32 @sync_read(double* %2, i32* %5, i64 %3, i32 0)
%7 = tail call i32 @fclose(i32* %5)
ret void
}
float jc_if_mix(float a, float b, float t) { return a * (1.0f - t) + b * t; }


x86 assembly (clang, -O0):
<jc_if_mix>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xee0(%rip),%xmm2
subss  -0xc(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<jc_if_mix>:
movss  0xef8(%rip),%xmm3
subss  %xmm2,%xmm3
mulss  %xmm2,%xmm1
mulss  %xmm3,%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @jc_if_mix(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %6
%9 = fsub float 1.000000e+00, %8
%10 = load float, float* %5
%11 = load float, float* %6
%12 = fmul float %10, %11
%13 = call float @llvm.fmuladd.f32(float %7, float %9, float %12)
ret float %13
}

LLVM IR (-O2):
define float @jc_if_mix(float %0, float %1, float %2) {
%4 = fsub float 1.000000e+00, %2
%5 = fmul float %1, %2
%6 = tail call float @llvm.fmuladd.f32(float %0, float %4, float %5)
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ default_line_gwt();
int /*<<< orphan*/ line1(double, double, double, double);
int /*<<< orphan*/ set_line_gwt(double, double, int);
void line(double x, double y, double xx, double yy, double g, double w,
          int it) {
  set_line_gwt(g, w, it);
  line1(x, y, xx, yy);
  default_line_gwt();
}


x86 assembly (clang, -O0):
<line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
mov    %edi,-0x34(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
mov    -0x34(%rbp),%edi
call   1030 <set_line_gwt@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1050 <line1@plt>
mov    $0x0,%al
call   1040 <default_line_gwt@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<line>:
sub    $0x28,%rsp
movsd  %xmm3,0x20(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
movaps %xmm4,%xmm0
movaps %xmm5,%xmm1
call   1030 <set_line_gwt@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x20(%rsp),%xmm3
call   1050 <line1@plt>
xor    %eax,%eax
add    $0x28,%rsp
jmp    1040 <default_line_gwt@plt>

LLVM IR (-O0):
define void @line(double %0, double %1, double %2, double %3, double %4, double %5, i32 %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca i32
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
store i32 %6, i32* %14
%15 = load double, double* %12
%16 = load double, double* %13
%17 = load i32, i32* %14
%18 = call i32 @set_line_gwt(double %15, double %16, i32 %17)
%19 = load double, double* %8
%20 = load double, double* %9
%21 = load double, double* %10
%22 = load double, double* %11
%23 = call i32 @line1(double %19, double %20, double %21, double %22)
%24 = call i32 (...) @default_line_gwt()
ret void
}

LLVM IR (-O2):
define void @line(double %0, double %1, double %2, double %3, double %4, double %5, i32 %6) {
%8 = tail call i32 @set_line_gwt(double %4, double %5, i32 %6)
%9 = tail call i32 @line1(double %0, double %1, double %2, double %3)
%10 = tail call i32 (...) @default_line_gwt()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
__attribute__((__noreturn__)) void abort(void) {
  puts("abort()");
  while (1) {
  }
}


x86 assembly (clang, -O0):
<abort>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
jmp    1120 <abort+0x10>

x86 assembly (clang, -O2):
<abort>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
nopl   (%rax)
jmp    1120 <abort+0x10>

LLVM IR (-O0):
@.str = [8 x i8] c"abort()\00"
define void @abort() {
%1 = call i32 @puts(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@.str = [8 x i8] c"abort()\00"
define void @abort() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void gopt_free(void *vptr_opts) { free(vptr_opts); }


x86 assembly (clang, -O0):
<gopt_free>:
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):
<gopt_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @gopt_free(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 @gopt_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ Initialize(int, char **);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ glutMainLoop();
int main(int argc, char *argv[]) {
  Initialize(argc, argv);
  glutMainLoop();
  exit(EXIT_SUCCESS);
}


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    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <Initialize@plt>
mov    $0x0,%al
call   1030 <glutMainLoop@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1040 <Initialize@plt>
xor    %eax,%eax
call   1030 <glutMainLoop@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
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 @Initialize(i32 %6, i8** %7)
%9 = call i32 (...) @glutMainLoop()
%10 = load i32, i32* @EXIT_SUCCESS
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @Initialize(i32 %0, i8** %1)
%4 = tail call i32 (...) @glutMainLoop()
%5 = load i32, i32* @EXIT_SUCCESS
%6 = tail call i32 @exit(i32 %5)
unreachable
}