xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ e_absy();
int /*<<< orphan*/ e_ora();
void e_ora_absy() {
  e_absy();
  e_ora();
}


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

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

LLVM IR (-O0):
define void @e_ora_absy() {
%1 = call i32 (...) @e_absy()
%2 = call i32 (...) @e_ora()
ret void
}

LLVM IR (-O2):
define void @e_ora_absy() {
%1 = tail call i32 (...) @e_absy()
%2 = tail call i32 (...) @e_ora()
ret void
}
/* Variables and functions */
char *my_alloc2(int, int);
int test2(int len) {
  int i;
  char *p = my_alloc2(32, len);
  return ((long int)p) & 31;
}


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x20,%edi
call   1030 <my_alloc2@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x1f,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
push   %rax
mov    %edi,%esi
mov    $0x20,%edi
call   1030 <my_alloc2@plt>
and    $0x1f,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i8* @my_alloc2(i32 32, i32 %5)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = and i64 %8, 31
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @test2(i32 %0) {
%2 = tail call i8* @my_alloc2(i32 32, i32 %0)
%3 = ptrtoint i8* %2 to i64
%4 = trunc i64 %3 to i32
%5 = and i32 %4, 31
ret i32 %5
}
int str_len(char *str) {
  int i = 0;
  while (str[i] != '\0') {
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<str_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <str_len+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <str_len+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_len>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <str_len+0x10>
ret

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

LLVM IR (-O2):
define i32 @str_len(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
int ls2h_hda_codec_proc_new(struct hda_codec *codec) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.hda_codec = type opaque
define i32 @ls2h_hda_codec_proc_new(%struct.hda_codec* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int kill(int pid, int signal) { exit(signal); }


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

x86 assembly (clang, -O2):
<kill>:
push   %rax
mov    %esi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @kill(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 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
define i32 @kill(i32 %0, i32 %1) {
%3 = tail call i32 @exit(i32 %1)
unreachable
}
int shifts(int x, int y) { return (x << y) + (x >> y); }


x86 assembly (clang, -O0):
<shifts>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shifts>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
sar    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @shifts(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 = shl i32 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = ashr i32 %8, %9
%11 = add nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @shifts(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = ashr i32 %0, %1
%5 = add nsw i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_closefile();
void fgmvwrite_closefile_() { gmvwrite_closefile(); }


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

x86 assembly (clang, -O2):
<fgmvwrite_closefile_>:
xor    %eax,%eax
jmp    1030 <gmvwrite_closefile@plt>

LLVM IR (-O0):
define void @fgmvwrite_closefile_() {
%1 = call i32 (...) @gmvwrite_closefile()
ret void
}

LLVM IR (-O2):
define void @fgmvwrite_closefile_() {
%1 = tail call i32 (...) @gmvwrite_closefile()
ret void
}
float equalto(float a, float b) {
  if (a == b) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<equalto>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jne    1135 <equalto+0x35>
jp     1135 <equalto+0x35>
movss  0xed5(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    113d <equalto+0x3d>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<equalto>:
cmpeqss %xmm1,%xmm0
movss  0xef3(%rip),%xmm1
andps  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @equalto(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fcmp oeq float %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store float 1.000000e+00, float* %3
br label %11
10: ; preds = %2
store float 0.000000e+00, float* %3
br label %11
11: ; preds = %10, %9
%12 = load float, float* %3
ret float %12
}

LLVM IR (-O2):
define float @equalto(float %0, float %1) {
%3 = fcmp oeq float %0, %1
%4 = select i1 %3, float 1.000000e+00, float 0.000000e+00
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ fxn(int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, int);
main() {
  int num1 = 1;
  printf("num1 is %d", num1);
  fxn(num1);
  printf("\nnum1 is %d", num1);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1050 <fxn@plt>
mov    -0x4(%rbp),%esi
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec9(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <fxn@plt>
lea    0xead(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"num1 is %d\00"
@.str.1 = [12 x i8] c"\0Anum1 is %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @fxn(i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 1)
%4 = tail call i32 (...) @getchar()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ bufferPrintf(char *, char const *);
int /*<<< orphan*/ panic();
void hfs_panic(const char *hfs_panicString) {
  bufferPrintf("%s\n", hfs_panicString);
  panic();
}


x86 assembly (clang, -O0):
<hfs_panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <bufferPrintf@plt>
mov    $0x0,%al
call   1030 <panic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hfs_panic>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1040 <bufferPrintf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <panic@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @hfs_panic(i8* %0) {
%2 = tail call i32 @bufferPrintf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @panic()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fputc_unlocked(int, int /*<<< orphan*/ *);
int putc_unlocked(int c, FILE *file) { return fputc_unlocked(c, file); }


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

x86 assembly (clang, -O2):
<putc_unlocked>:
jmp    1030 <fputc_unlocked@plt>

LLVM IR (-O0):
define i32 @putc_unlocked(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 @fputc_unlocked(i32 %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @putc_unlocked(i32 %0, i32* nocapture %1) {
%3 = tail call i32 @fputc_unlocked(i32 %0, i32* %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ data;

/* Variables and functions */
int read(int, unsigned char *, int);
unsigned char pressed_mouse_button(int fd, unsigned char button) {
  volatile unsigned char data[3];
  volatile unsigned char ret = 0;
  int bytes;
  bytes = read(fd, (unsigned char *)data, sizeof(data));
  if (bytes > 0) {
    ret = data[0] & button;
  }
  return ret;
}


x86 assembly (clang, -O0):
<pressed_mouse_button>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
movb   $0x0,-0x9(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
mov    $0x3,%edx
call   1030 <read@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jle    1152 <pressed_mouse_button+0x42>
mov    -0x8(%rbp),%al
movzbl %al,%eax
movzbl -0x5(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pressed_mouse_button>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
movb   $0x0,0xc(%rsp)
lea    0xd(%rsp),%rsi
mov    $0x3,%edx
call   1030 <read@plt>
test   %eax,%eax
jle    1137 <pressed_mouse_button+0x27>
and    0xd(%rsp),%bl
mov    %bl,0xc(%rsp)
mov    0xc(%rsp),%al
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @pressed_mouse_button(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca [3 x i8]
%6 = alloca i8
%7 = alloca i32
store i32 %0, i32* %3
store i8 %1, i8* %4
store volatile i8 0, i8* %6
%8 = load i32, i32* %3
%9 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
%10 = call i32 @read(i32 %8, i8* %9, i32 3)
store i32 %10, i32* %7
%11 = load i32, i32* %7
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %21
13: ; preds = %2
%14 = getelementptr inbounds [3 x i8], [3 x i8]* %5, i64 0, i64 0
%15 = load volatile i8, i8* %14
%16 = zext i8 %15 to i32
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = and i32 %16, %18
%20 = trunc i32 %19 to i8
store volatile i8 %20, i8* %6
br label %21
21: ; preds = %13, %2
%22 = load volatile i8, i8* %6
ret i8 %22
}

LLVM IR (-O2):
define zeroext i8 @pressed_mouse_button(i32 %0, i8 zeroext %1) {
%3 = alloca [3 x i8]
%4 = alloca i8
%5 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
store volatile i8 0, i8* %4
%6 = call i32 @read(i32 %0, i8* %5, i32 3)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load volatile i8, i8* %5
%10 = and i8 %9, %1
store volatile i8 %10, i8* %4
br label %11
11: ; preds = %8, %2
%12 = load volatile i8, i8* %4
ret i8 %12
}
unsigned BCPL(unsigned seed) { return seed * 2147001325U + 715136305U; }


x86 assembly (clang, -O0):
<BCPL>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x7ff8a3ed,-0x4(%rbp),%eax
add    $0x2aa01d31,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BCPL>:
imul   $0x7ff8a3ed,%edi,%eax
add    $0x2aa01d31,%eax
ret

LLVM IR (-O0):
define i32 @BCPL(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 2147001325
%5 = add i32 %4, 715136305
ret i32 %5
}

LLVM IR (-O2):
define i32 @BCPL(i32 %0) {
%2 = mul i32 %0, 2147001325
%3 = add i32 %2, 715136305
ret i32 %3
}
/* Variables and functions */
unsigned int min(unsigned int, unsigned int);
unsigned int minimum(unsigned int a, unsigned int b, unsigned int c) {
  return min(min(a, b), c);
}


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

x86 assembly (clang, -O2):
<minimum>:
push   %rbx
mov    %edx,%ebx
call   1030 <min@plt>
mov    %eax,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <min@plt>

LLVM IR (-O0):
define i32 @minimum(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* %5
%9 = call i32 @min(i32 %7, i32 %8)
%10 = load i32, i32* %6
%11 = call i32 @min(i32 %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @minimum(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @min(i32 %0, i32 %1)
%5 = tail call i32 @min(i32 %4, i32 %2)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sig_int() { printf("interrupt.\n"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"interrupt.\0A\00"
define void @sig_int() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"interrupt.\00"
define void @sig_int() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
void Draw(void) {}


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

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

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

LLVM IR (-O2):
define void @Draw() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ sigaction(int /*<<< orphan*/, int /*<<< orphan*/ *,
                             int /*<<< orphan*/ *);
void disable_signal_handlers() {
  sigaction(SIGCHLD, NULL, NULL);
  sigaction(SIGINT, NULL, NULL);
  sigaction(SIGQUIT, NULL, NULL);
  sigaction(SIGTERM, NULL, NULL);
}


x86 assembly (clang, -O0):
<disable_signal_handlers>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1030 <sigaction@plt>
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1030 <sigaction@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1030 <sigaction@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rsi
call   1030 <sigaction@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable_signal_handlers>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <sigaction@plt>
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <sigaction@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <sigaction@plt>
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
xor    %edx,%edx
pop    %rax
jmp    1030 <sigaction@plt>

LLVM IR (-O0):
@SIGCHLD = global i32 0
@SIGINT = global i32 0
@SIGQUIT = global i32 0
@SIGTERM = global i32 0
define void @disable_signal_handlers() {
%1 = load i32, i32* @SIGCHLD
%2 = call i32 @sigaction(i32 %1, i32* null, i32* null)
%3 = load i32, i32* @SIGINT
%4 = call i32 @sigaction(i32 %3, i32* null, i32* null)
%5 = load i32, i32* @SIGQUIT
%6 = call i32 @sigaction(i32 %5, i32* null, i32* null)
%7 = load i32, i32* @SIGTERM
%8 = call i32 @sigaction(i32 %7, i32* null, i32* null)
ret void
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
@SIGINT = global i32 0
@SIGQUIT = global i32 0
@SIGTERM = global i32 0
define void @disable_signal_handlers() {
%1 = load i32, i32* @SIGCHLD
%2 = tail call i32 @sigaction(i32 %1, i32* null, i32* null)
%3 = load i32, i32* @SIGINT
%4 = tail call i32 @sigaction(i32 %3, i32* null, i32* null)
%5 = load i32, i32* @SIGQUIT
%6 = tail call i32 @sigaction(i32 %5, i32* null, i32* null)
%7 = load i32, i32* @SIGTERM
%8 = tail call i32 @sigaction(i32 %7, i32* null, i32* null)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void display_version() {
  puts("ed2kd benchmark (eb) v"
       "0.01"
       "\n"
       "Build on: "
       "Mar 17 2022"
       " "
       "06:35:17");
}


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

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

LLVM IR (-O0):
@.str = [58 x i8] c"ed2kd benchmark (eb) v0.01\0ABuild on: Mar 17 2022 06:35:17\00"
define void @display_version() {
%1 = call i32 @puts(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [58 x i8] c"ed2kd benchmark (eb) v0.01\0ABuild on: Mar 17 2022 06:35:17\00"
define void @display_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int scan_for_intN(char const *, int, long long *, char const **);
int scan_for_int64(const char *_str, long long *ret_, const char **end_) {
  long long ret;
  int b_err = scan_for_intN(_str, 64, &ret, end_);
  if (ret_) {
    *ret_ = ret;
  }
  return b_err;
}


x86 assembly (clang, -O0):
<scan_for_int64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x40,%esi
lea    -0x20(%rbp),%rdx
call   1030 <scan_for_intN@plt>
mov    %eax,-0x24(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1153 <scan_for_int64+0x43>
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scan_for_int64>:
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%rcx
mov    %rsi,%rbx
lea    0x8(%rsp),%rdx
mov    $0x40,%esi
call   1030 <scan_for_intN@plt>
test   %rbx,%rbx
je     1137 <scan_for_int64+0x27>
mov    0x8(%rsp),%rcx
mov    %rcx,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @scan_for_int64(i8* %0, i64* writeonly %1, i8** %2) {
%4 = alloca i64
%5 = bitcast i64* %4 to i8*
%6 = call i32 @scan_for_intN(i8* %0, i32 64, i64* %4, i8** %2)
%7 = icmp eq i64* %1, null
br i1 %7, label %10, label %8
8: ; preds = %3
%9 = load i64, i64* %4
store i64 %9, i64* %1
br label %10
10: ; preds = %8, %3
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ vwrite_log(int /*<<< orphan*/, int, char const *,
                              int /*<<< orphan*/);
void vverr(char const *msg, va_list args) { vwrite_log(0, 5, msg, args); }


x86 assembly (clang, -O0):
<vverr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0xc(%rbp),%ecx
xor    %edi,%edi
mov    $0x5,%esi
call   1030 <vwrite_log@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vverr>:
mov    %esi,%ecx
mov    %rdi,%rdx
xor    %edi,%edi
mov    $0x5,%esi
jmp    1030 <vwrite_log@plt>

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

LLVM IR (-O2):
define void @vverr(i8* %0, i32 %1) {
%3 = tail call i32 @vwrite_log(i32 0, i32 5, i8* %0, i32 %1)
ret void
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ log_error(char *);
void _node_add_child(struct node *this, struct node *child) {
  log_error("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
            "2022-01-22/02-19-57/repos/Uga-Agga/Game/refs/heads/master/src/"
            "ticker/template.c"
            ":"
            "421"
            ": "
            "error: "
            "node_add_child: invalid operation");
}


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

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

LLVM IR (-O0):
%struct.node = type { i32 }
@.str = [190 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Uga-Agga/Game/refs/heads/master/src/ticker/template.c:421: error: node_add_child: invalid operation\00"
define void @_node_add_child(%struct.node* %0, %struct.node* %1) {
%3 = alloca %struct.node*
%4 = alloca %struct.node*
store %struct.node* %0, %struct.node** %3
store %struct.node* %1, %struct.node** %4
%5 = call i32 @log_error(i8* getelementptr inbounds ([190 x i8], [190 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.node = type { i32 }
@.str = [190 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Uga-Agga/Game/refs/heads/master/src/ticker/template.c:421: error: node_add_child: invalid operation\00"
define void @_node_add_child(%struct.node* nocapture readnone %0, %struct.node* nocapture readnone %1) {
%3 = tail call i32 @log_error(i8* getelementptr inbounds ([190 x i8], [190 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
float *number3(int *pixmap, int *count) {
  *count = 3;
  float *attributesArray = (float *)malloc(3 * sizeof(float));
  attributesArray[0] = 1.1;
  attributesArray[1] = 2.2;
  attributesArray[2] = 3.3;
  return (attributesArray);
}


x86 assembly (clang, -O0):
<number3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x3,(%rax)
mov    $0xc,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movss  0xec4(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movss  0xeb0(%rip),%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x18(%rbp),%rax
movss  0xe9b(%rip),%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<number3>:
push   %rax
movl   $0x3,(%rsi)
mov    $0xc,%edi
call   1030 <malloc@plt>
movabs $0x400ccccd3f8ccccd,%rcx
cc 0c 40
mov    %rcx,(%rax)
movl   $0x40533333,0x8(%rax)
pop    %rcx
ret

LLVM IR (-O0):
define float* @number3(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca float*
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
store i32 3, i32* %6
%7 = call i64 @malloc(i32 12)
%8 = inttoptr i64 %7 to float*
store float* %8, float** %5
%9 = load float*, float** %5
%10 = getelementptr inbounds float, float* %9, i64 0
store float 0x3FF19999A0000000, float* %10
%11 = load float*, float** %5
%12 = getelementptr inbounds float, float* %11, i64 1
store float 0x40019999A0000000, float* %12
%13 = load float*, float** %5
%14 = getelementptr inbounds float, float* %13, i64 2
store float 0x400A666660000000, float* %14
%15 = load float*, float** %5
ret float* %15
}

LLVM IR (-O2):
define float* @number3(i32* nocapture readnone %0, i32* nocapture writeonly %1) {
store i32 3, i32* %1
%3 = tail call i64 @malloc(i32 12)
%4 = inttoptr i64 %3 to float*
store float 0x3FF19999A0000000, float* %4
%5 = getelementptr inbounds float, float* %4, i64 1
store float 0x40019999A0000000, float* %5
%6 = getelementptr inbounds float, float* %4, i64 2
store float 0x400A666660000000, float* %6
ret float* %4
}
/* Variables and functions */
scalar_t__ isspace(int);
int valid_fcb_sep(int i) {
  return isspace(i) || i == ',' || i == '=' || i == ';';
}


x86 assembly (clang, -O0):
<valid_fcb_sep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <isspace@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    115d <valid_fcb_sep+0x4d>
mov    $0x1,%al
cmpl   $0x2c,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115d <valid_fcb_sep+0x4d>
mov    $0x1,%al
cmpl   $0x3d,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115d <valid_fcb_sep+0x4d>
cmpl   $0x3b,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_fcb_sep>:
push   %rbx
mov    %edi,%ebx
call   1030 <isspace@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1127 <valid_fcb_sep+0x17>
pop    %rbx
ret
cmp    $0x2c,%ebx
je     1125 <valid_fcb_sep+0x15>
cmp    $0x3d,%ebx
je     1125 <valid_fcb_sep+0x15>
xor    %eax,%eax
cmp    $0x3b,%ebx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @valid_fcb_sep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @isspace(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 44
br i1 %8, label %15, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 61
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 59
br label %15
15: ; preds = %12, %9, %6, %1
%16 = phi i1 [ true, %9 ], [ true, %6 ], [ true, %1 ], [ %14, %12 ]
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @valid_fcb_sep(i32 %0) {
%2 = tail call i64 @isspace(i32 %0)
%3 = freeze i64 %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
switch i32 %0, label %6 [
i32 61, label %9
i32 44, label %9
]
6: ; preds = %5
%7 = icmp eq i32 %0, 59
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %5, %1, %6
%10 = phi i32 [ 1, %5 ], [ %8, %6 ], [ 1, %1 ], [ 1, %5 ]
ret i32 %10
}
/* Variables and functions */
int edit1(int *, char);
int visual(int *msgvec) { return (edit1(msgvec, 'v')); }


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

x86 assembly (clang, -O2):
<visual>:
mov    $0x76,%esi
jmp    1030 <edit1@plt>

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

LLVM IR (-O2):
define i32 @visual(i32* %0) {
%2 = tail call i32 @edit1(i32* %0, i8 signext 118)
ret i32 %2
}
int isspace(int c) {
  return (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' ||
          c == '\v');
}


x86 assembly (clang, -O0):
<isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
mov    $0x1,%al
cmpl   $0xc,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
mov    $0x1,%al
cmpl   $0xa,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
mov    $0x1,%al
cmpl   $0xd,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
mov    $0x1,%al
cmpl   $0x9,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <isspace+0x5c>
cmpl   $0xb,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isspace>:
cmp    $0x20,%edi
ja     111d <isspace+0x1d>
mov    $0x1,%eax
mov    %edi,%ecx
movabs $0x100003600,%rdx
bt     %rcx,%rdx
jae    111d <isspace+0x1d>
ret
xor    %eax,%eax
cmp    $0xb,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @isspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
br i1 %4, label %20, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 12
br i1 %7, label %20, label %8
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 10
br i1 %10, label %20, label %11
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 13
br i1 %13, label %20, label %14
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 9
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp eq i32 %18, 11
br label %20
20: ; preds = %17, %14, %11, %8, %5, %1
%21 = phi i1 [ true, %14 ], [ true, %11 ], [ true, %8 ], [ true, %5 ], [ true, %1 ], [ %19, %17 ]
%22 = zext i1 %21 to i32
ret i32 %22
}

LLVM IR (-O2):
define i32 @isspace(i32 %0) {
switch i32 %0, label %2 [
i32 32, label %5
i32 13, label %5
i32 12, label %5
i32 10, label %5
i32 9, label %5
]
2: ; preds = %1
%3 = icmp eq i32 %0, 11
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
__attribute__((nonnull)) void v_free(void *p) {
  struct {
    size_t size : 54, on_heap : 1, capacity : 6, flag1 : 1, flag2 : 1,
        flag3 : 1;
    void *ptr;
  } *s = p;
  if (s->on_heap)
    free(s->ptr);
}


x86 assembly (clang, -O0):
<v_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
shr    $0x36,%rax
and    $0x1,%rax
cmp    $0x0,%rax
je     114a <v_free+0x3a>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v_free>:
testb  $0x40,0x6(%rdi)
jne    1117 <v_free+0x7>
ret
mov    0x8(%rdi),%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.anon = type { i64, i8* }
define void @v_free(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.anon*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.anon*
store %struct.anon* %5, %struct.anon** %3
%6 = load %struct.anon*, %struct.anon** %3
%7 = bitcast %struct.anon* %6 to i64*
%8 = load i64, i64* %7
%9 = lshr i64 %8, 54
%10 = and i64 %9, 1
%11 = icmp ne i64 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %1
%13 = load %struct.anon*, %struct.anon** %3
%14 = getelementptr inbounds %struct.anon, %struct.anon* %13, i32 0, i32 1
%15 = load i8*, i8** %14
%16 = call i32 @free(i8* %15)
br label %17
17: ; preds = %12, %1
ret void
}

LLVM IR (-O2):
define void @v_free(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = and i64 %3, 18014398509481984
%5 = icmp eq i64 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = getelementptr inbounds i8, i8* %0, i64 8
%8 = bitcast i8* %7 to i8**
%9 = load i8*, i8** %8
%10 = tail call i32 @free(i8* %9)
br label %11
11: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mmu_test();
int /*<<< orphan*/ ramfill();
int /*<<< orphan*/ report_end();
int /*<<< orphan*/ report_start();
int main() {
  report_start();
  ramfill();
  mmu_test();
  report_end();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <report_start@plt>
xor    %eax,%eax
call   1050 <ramfill@plt>
xor    %eax,%eax
call   1040 <mmu_test@plt>
xor    %eax,%eax
call   1030 <report_end@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @report_start()
%2 = tail call i32 (...) @ramfill()
%3 = tail call i32 (...) @mmu_test()
%4 = tail call i32 (...) @report_end()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  char foo[(1 + sizeof "foo") / 2];
  assert(sizeof foo == 2);
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i8]
store i32 0, i32* %1
%3 = call i32 @assert(i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xcf() {
  Assert_real((isascii(207) == 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",
              1040, ("isascii should be 0 for 0xcf"));
}


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

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


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

x86 assembly (clang, -O2):
<set2>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i32* @set2(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
ret i32* %5
}

LLVM IR (-O2):
define i32* @set2(i32* readnone returned %0, i32* nocapture readnone %1) {
ret i32* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t test_tagged_nonint_enum1(uint16_t val) { return val; }


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

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

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

LLVM IR (-O2):
define i32 @test_tagged_nonint_enum1(i32 returned %0) {
ret i32 %0
}
float mul(float a, float b) { return a * b; }


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

x86 assembly (clang, -O2):
<mul>:
mulss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @mul(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fmul float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @mul(float %0, float %1) {
%3 = fmul float %0, %1
ret float %3
}
/* Variables and functions */
char *strdup(char const *);
char *null_strdup(const char *in) {
  if (in)
    return strdup(in);
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @null_strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i8* @strdup(i8* %0)
br label %5
5: ; preds = %1, %3
%6 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint16_t le16toh(uint16_t little_endian_16bits) { return little_endian_16bits; }


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

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

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

LLVM IR (-O2):
define i32 @le16toh(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void func1(void *arg) {
  if (arg != (void *)42) {
    printf("ERROR\n");
    exit(-1);
  } else {
    printf("test1\n");
  }
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x2a,%eax
cmp    %rax,-0x8(%rbp)
je     1151 <func1+0x31>
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func1>:
cmp    $0x2a,%rdi
jne    1132 <func1+0x12>
lea    0xed3(%rip),%rdi
jmp    1030 <puts@plt>
push   %rax
lea    0xecc(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"ERROR\0A\00"
@.str.1 = [7 x i8] c"test1\0A\00"
define void @func1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, inttoptr (i64 42 to i8*)
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 -1)
unreachable
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %10
10: ; preds = %8
ret void
}

LLVM IR (-O2):
@str = [6 x i8] c"test1\00"
@str.2 = [6 x i8] c"ERROR\00"
define void @func1(i8* readnone %0) {
%2 = icmp eq i8* %0, inttoptr (i64 42 to i8*)
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.2, i64 0, i64 0))
%5 = tail call i32 @exit(i32 -1)
unreachable
6: ; preds = %1
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
void swresample_version() {}


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

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

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

LLVM IR (-O2):
define void @swresample_version() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_signal_free() {
  printf("NOT IMPLEMENTED:"
         "pa_signal_free"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [32 x i8] c"NOT IMPLEMENTED:pa_signal_free\0A\00"
define i32 @pa_signal_free() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [31 x i8] c"NOT IMPLEMENTED:pa_signal_free\00"
define i32 @pa_signal_free() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_error_message(void) {
  printf("'u2test' takes as command-line arguments the RA/dec of the\n"
         "center of the region to be extracted;  its width and height;\n"
         "and,  optionally,  the path to the UCAC-2 data.  All angles\n"
         "are in decimal degrees.  For example:\n\n"
         "ucac2 50 -16.3 2 1.5 "
         "/mnt/cdrom/u2"
         "\n\n"
         "would extract a 2-degree wide,  1.5-degree high area centered\n"
         "on RA=50 degrees=3h20m, dec=-16.3,  with the data drawn from\n"
         "the path "
         "/mnt/cdrom/u2"
         ".  Data will be written to the file 'ucac2.txt'.\n");
}


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

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

LLVM IR (-O0):
@.str = [450 x i8] c"'u2test' takes as command-line arguments the RA/dec of the\0Acenter of the region to be extracted; its width and height;\0Aand, optionally, the path to the UCAC-2 data. All angles\0Aare in decimal degrees. For example:\0A\0Aucac2 50 -16.3 2 1.5 /mnt/cdrom/u2\0A\0Awould extract a 2-degree wide, 1.5-degree high area centered\0Aon RA=50 degrees=3h20m, dec=-16.3, with the data drawn from\0Athe path /mnt/cdrom/u2. Data will be written to the file 'ucac2.txt'.\0A\00"
define void @show_error_message() {
%1 = call i32 @printf(i8* getelementptr inbounds ([450 x i8], [450 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [449 x i8] c"'u2test' takes as command-line arguments the RA/dec of the\0Acenter of the region to be extracted; its width and height;\0Aand, optionally, the path to the UCAC-2 data. All angles\0Aare in decimal degrees. For example:\0A\0Aucac2 50 -16.3 2 1.5 /mnt/cdrom/u2\0A\0Awould extract a 2-degree wide, 1.5-degree high area centered\0Aon RA=50 degrees=3h20m, dec=-16.3, with the data drawn from\0Athe path /mnt/cdrom/u2. Data will be written to the file 'ucac2.txt'.\00"
define void @show_error_message() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([449 x i8], [449 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, char);
void Bochs_debug_putc(char c) { outb(0xe9, c); }


x86 assembly (clang, -O0):
<Bochs_debug_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0xe9,%edi
movsbl -0x1(%rbp),%esi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bochs_debug_putc>:
mov    %edi,%esi
mov    $0xe9,%edi
jmp    1030 <outb@plt>

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

LLVM IR (-O2):
define void @Bochs_debug_putc(i8 signext %0) {
%2 = tail call i32 @outb(i32 233, i8 signext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _PROCEDURE_LINKAGE_TABLE_();
void mktemp() {
  _PROCEDURE_LINKAGE_TABLE_();
  return;
}


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

x86 assembly (clang, -O2):
<mktemp>:
xor    %eax,%eax
jmp    1030 <_PROCEDURE_LINKAGE_TABLE_@plt>

LLVM IR (-O0):
define void @mktemp() {
%1 = call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
ret void
}

LLVM IR (-O2):
define void @mktemp() {
%1 = tail call i32 (...) @_PROCEDURE_LINKAGE_TABLE_()
ret void
}