xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ mkfifo(char *, int);
int /*<<< orphan*/ printf(char *, char *);
void create_fifo(char *fifo_path) {
  printf(" creating fifo: %s\n", fifo_path);
  mkfifo(fifo_path, 0666);
}


x86 assembly (clang, -O0):
<create_fifo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0x1b6,%esi
call   1040 <mkfifo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_fifo>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1b6,%esi
pop    %rbx
jmp    1040 <mkfifo@plt>

LLVM IR (-O0):
@.str = [20 x i8] c" creating fifo: %s\0A\00"
define void @create_fifo(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @mkfifo(i8* %5, i32 438)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c" creating fifo: %s\0A\00"
define void @create_fifo(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @mkfifo(i8* %0, i32 438)
ret void
}
/* Variables and functions */
int g5(int, int);
int g5_Skel(int *argTypes, void **args) {
  *(int *)args[0] = g5(*(int *)args[1], *(int *)args[2]);
  return 0;
}


x86 assembly (clang, -O0):
<g5_Skel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    (%rax),%esi
call   1030 <g5@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g5_Skel>:
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rax
mov    0x10(%rsi),%rcx
mov    (%rax),%edi
mov    (%rcx),%esi
call   1030 <g5@plt>
mov    (%rbx),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @g5_Skel(i32* nocapture readnone %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = bitcast i8** %3 to i32**
%5 = load i32*, i32** %4
%6 = load i32, i32* %5
%7 = getelementptr inbounds i8*, i8** %1, i64 2
%8 = bitcast i8** %7 to i32**
%9 = load i32*, i32** %8
%10 = load i32, i32* %9
%11 = tail call i32 @g5(i32 %6, i32 %10)
%12 = bitcast i8** %1 to i32**
%13 = load i32*, i32** %12
store i32 %11, i32* %13
ret i32 0
}
void f2(void) { extern int x8; }


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

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

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

LLVM IR (-O2):
define void @f2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ OPENSSL_die(char *, char *, int);
int main(int argc, char **argv) {
  OPENSSL_die("Voluntary abort",
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/"
              "heads/master/Src/OSF/OpenSSL-111/test/aborttest.c",
              13);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
lea    0xedc(%rip),%rsi
mov    $0xd,%edx
call   1030 <OPENSSL_die@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xef1(%rip),%rsi
mov    $0xd,%edx
call   1030 <OPENSSL_die@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Voluntary abort\00"
@.str.1 = [173 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/master/Src/OSF/OpenSSL-111/test/aborttest.c\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @OPENSSL_die(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.1, i64 0, i64 0), i32 13)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"Voluntary abort\00"
@.str.1 = [173 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/papyrussolution/OpenPapyrus/refs/heads/master/Src/OSF/OpenSSL-111/test/aborttest.c\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @OPENSSL_die(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([173 x i8], [173 x i8]* @.str.1, i64 0, i64 0), i32 13)
ret i32 0
}
void gtk_widget_intersect() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_intersect() {
ret void
}
void MemManage_Handler(void) {
  for (;;) {
  }
}


x86 assembly (clang, -O0):
<MemManage_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <MemManage_Handler+0x9>
jmp    1109 <MemManage_Handler+0x9>

x86 assembly (clang, -O2):
<MemManage_Handler>:
jmp    1100 <MemManage_Handler>

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

LLVM IR (-O2):
define void @MemManage_Handler() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ getkey();
int /*<<< orphan*/ multiplekeys();
int /*<<< orphan*/ singlekey();
int /*<<< orphan*/ usleep(unsigned long);
void pressanykey(void) {
  singlekey();
  do
    usleep(50000UL);
  while (!getkey());
  multiplekeys();
}


x86 assembly (clang, -O0):
<pressanykey>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <singlekey@plt>
mov    $0xc350,%edi
call   1060 <usleep@plt>
mov    $0x0,%al
call   1040 <getkey@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    114b <pressanykey+0xb>
mov    $0x0,%al
call   1050 <multiplekeys@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pressanykey>:
push   %rax
xor    %eax,%eax
call   1030 <singlekey@plt>
nopl   0x0(%rax,%rax,1)
mov    $0xc350,%edi
call   1060 <usleep@plt>
xor    %eax,%eax
call   1040 <getkey@plt>
test   %eax,%eax
je     1150 <pressanykey+0x10>
xor    %eax,%eax
pop    %rcx
jmp    1050 <multiplekeys@plt>

LLVM IR (-O0):
define void @pressanykey() {
%1 = call i32 (...) @singlekey()
br label %2
2: ; preds = %4, %0
%3 = call i32 @usleep(i64 50000)
br label %4
4: ; preds = %2
%5 = call i32 (...) @getkey()
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
br i1 %7, label %2, label %8
8: ; preds = %4
%9 = call i32 (...) @multiplekeys()
ret void
}

LLVM IR (-O2):
define void @pressanykey() {
%1 = tail call i32 (...) @singlekey()
br label %2
2: ; preds = %2, %0
%3 = tail call i32 @usleep(i64 50000)
%4 = tail call i32 (...) @getkey()
%5 = icmp eq i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = tail call i32 (...) @multiplekeys()
ret void
}
/* Variables and functions */
scalar_t__ _gettemp(char *, int *, int /*<<< orphan*/, int, int);
int mkostemps(char *path, int slen, int oflags) {
  int fd;
  return (_gettemp(path, &fd, 0, slen, oflags) ? fd : -1);
}


x86 assembly (clang, -O0):
<mkostemps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    -0x14(%rbp),%rsi
xor    %edx,%edx
call   1030 <_gettemp@plt>
cmp    $0x0,%rax
je     114d <mkostemps+0x3d>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    115a <mkostemps+0x4a>
mov    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    115a <mkostemps+0x4a>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkostemps>:
push   %rax
mov    %edx,%r8d
mov    %esi,%ecx
lea    0x4(%rsp),%rsi
xor    %edx,%edx
call   1030 <_gettemp@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
or     0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @mkostemps(i8* %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i64 @_gettemp(i8* %0, i32* %4, i32 0, i32 %1, i32 %2)
%7 = icmp eq i64 %6, 0
%8 = load i32, i32* %4
%9 = select i1 %7, i32 -1, i32 %8
ret i32 %9
}
int ISORegexp__find_open_brace(char *p) {
  for (int i = 0; p[i]; i++)
    if (p[i] == '{')
      return i;
  return -1;
}


x86 assembly (clang, -O0):
<ISORegexp__find_open_brace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1154 <ISORegexp__find_open_brace+0x54>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x7b,%eax
jne    1141 <ISORegexp__find_open_brace+0x41>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115b <ISORegexp__find_open_brace+0x5b>
jmp    1146 <ISORegexp__find_open_brace+0x46>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <ISORegexp__find_open_brace+0xf>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ISORegexp__find_open_brace>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%ecx
test   %cl,%cl
je     1123 <ISORegexp__find_open_brace+0x23>
cmp    $0x7b,%cl
je     1128 <ISORegexp__find_open_brace+0x28>
add    $0x1,%rax
jmp    1110 <ISORegexp__find_open_brace+0x10>
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @ISORegexp__find_open_brace(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %23, %1
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %26
12: ; preds = %5
%13 = load i8*, i8** %3
%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 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 123
br i1 %19, label %20, label %22
20: ; preds = %12
%21 = load i32, i32* %4
store i32 %21, i32* %2
br label %27
22: ; preds = %12
br label %23
23: ; preds = %22
%24 = load i32, i32* %4
%25 = add nsw i32 %24, 1
store i32 %25, i32* %4
br label %5
26: ; preds = %5
store i32 -1, i32* %2
br label %27
27: ; preds = %26, %20
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @ISORegexp__find_open_brace(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ %7, %6 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %6 [
i8 0, label %10
i8 123, label %8
]
6: ; preds = %2
%7 = add nuw i64 %3, 1
br label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
br label %10
10: ; preds = %2, %8
%11 = phi i32 [ %9, %8 ], [ -1, %2 ]
ret i32 %11
}
void gtk_spin_button_get_adjustment() {}


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

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

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

LLVM IR (-O2):
define void @gtk_spin_button_get_adjustment() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
scalar_t__ waitpid(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
void sigchld(int signo) {
  while (waitpid(-1, NULL, WNOHANG) > 0)
    ;
}


x86 assembly (clang, -O0):
<sigchld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <waitpid@plt>
cmp    $0x0,%rax
jle    1141 <sigchld+0x31>
jmp    111b <sigchld+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigchld>:
push   %rbx
mov    0x2ed0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <waitpid@plt>
test   %rax,%rax
jg     1120 <sigchld+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
define void @sigchld(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* @WNOHANG
%5 = call i64 @waitpid(i32 -1, i32* null, i32 %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @sigchld(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = load i32, i32* @WNOHANG
%4 = tail call i64 @waitpid(i32 -1, i32* null, i32 %3)
%5 = icmp sgt i64 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
ret void
}
/* Variables and functions */
int celix_utils_compareServiceIdsAndRanking(long, long, long, long);
int utils_compareServiceIdsAndRanking(long svcIdA, long svcRankA, long svcIdB,
                                      long svcRankB) {
  return celix_utils_compareServiceIdsAndRanking(svcIdA, svcRankA, svcIdB,
                                                 svcRankB);
}


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

x86 assembly (clang, -O2):
<utils_compareServiceIdsAndRanking>:
jmp    1030 <celix_utils_compareServiceIdsAndRanking@plt>

LLVM IR (-O0):
define i32 @utils_compareServiceIdsAndRanking(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = load i64, i64* %7
%12 = load i64, i64* %8
%13 = call i32 @celix_utils_compareServiceIdsAndRanking(i64 %9, i64 %10, i64 %11, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @utils_compareServiceIdsAndRanking(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i32 @celix_utils_compareServiceIdsAndRanking(i64 %0, i64 %1, i64 %2, i64 %3)
ret i32 %5
}
/* Variables and functions */
float num_atan2(float, int);
float num_atan(float a) { return num_atan2(a, 1); }


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

x86 assembly (clang, -O2):
<num_atan>:
mov    $0x1,%edi
jmp    1030 <num_atan2@plt>

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

LLVM IR (-O2):
define float @num_atan(float %0) {
%2 = tail call float @num_atan2(float %0, i32 1)
ret float %2
}
/* Variables and functions */
char *strcat(char *, char *);
char *t6(char *x) { return strcat(x, ""); }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @t6(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strcat(i8* %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}

LLVM IR (-O2):
define i8* @t6(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int unlink(char const *);
int removefifo(const char *path) { return unlink(path); }


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

x86 assembly (clang, -O2):
<removefifo>:
jmp    1030 <unlink@plt>

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

LLVM IR (-O2):
define i32 @removefifo(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void *gethostbyname;
int main(int argc, char *argv[]) {
  void *p;
  (void)argc;
  (void)argv;
  p = gethostbyname;
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

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

LLVM IR (-O0):
@gethostbyname = global i8* null
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load i8*, i8** @gethostbyname
store i8* %9, i8** %6
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@gethostbyname = global i8* null
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @exit(i32 0)
unreachable
}
void glGetUniformuiv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glGetUniformuiv() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ sbphostn64n(int *, char *, int /*<<< orphan*/);
void sbphostn64n__(int *ierr, char *name, uint64_t namelen) {
  sbphostn64n(ierr, name, namelen);
}


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

x86 assembly (clang, -O2):
<sbphostn64n__>:
jmp    1030 <sbphostn64n@plt>

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

LLVM IR (-O2):
define void @sbphostn64n__(i32* %0, i8* %1, i32 %2) {
%4 = tail call i32 @sbphostn64n(i32* %0, i8* %1, i32 %2)
ret void
}
long double ReturnLongDoubleFromFloat(float f) { return f; }


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

x86 assembly (clang, -O2):
<ReturnLongDoubleFromFloat>:
movss  %xmm0,-0x4(%rsp)
flds   -0x4(%rsp)
ret

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

LLVM IR (-O2):
define x86_fp80 @ReturnLongDoubleFromFloat(float %0) {
%2 = fpext float %0 to x86_fp80
ret x86_fp80 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
long long strtoll(char const *, char **, int);
long long strtoll_l(const char *restrict s, char **restrict p, int base,
                    locale_t loc) {
  return strtoll(s, p, base);
}


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

x86 assembly (clang, -O2):
<strtoll_l>:
jmp    1030 <strtoll@plt>

LLVM IR (-O0):
define i64 @strtoll_l(i8* noalias %0, i8** noalias %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8**
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8** %1, i8*** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8**, i8*** %6
%11 = load i32, i32* %7
%12 = call i64 @strtoll(i8* %9, i8** %10, i32 %11)
ret i64 %12
}

LLVM IR (-O2):
define i64 @strtoll_l(i8* noalias %0, i8** noalias nocapture %1, i32 %2, i32 %3) {
%5 = tail call i64 @strtoll(i8* %0, i8** %1, i32 %2)
ret i64 %5
}
double omp_get_wtime(void) { return 0; }


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

x86 assembly (clang, -O2):
<omp_get_wtime>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @omp_get_wtime() {
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @omp_get_wtime() {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void func1() { printf("in func1\n"); }


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

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

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

LLVM IR (-O2):
@str = [9 x i8] c"in func1\00"
define void @func1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ avoid_os_sort(double *, int);
int /*<<< orphan*/ os_sort_realnums(double *, int, double *);
int /*<<< orphan*/ spr_sort_realnums(double *, int, double *);
void sort_realnums(double *farr, int size, double *r_farr) {
  if (avoid_os_sort(farr, size))
    spr_sort_realnums(farr, size, r_farr);
  else
    os_sort_realnums(farr, size, r_farr);
}


x86 assembly (clang, -O0):
<sort_realnums>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1050 <avoid_os_sort@plt>
cmp    $0x0,%rax
je     116e <sort_realnums+0x3e>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <spr_sort_realnums@plt>
jmp    117e <sort_realnums+0x4e>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1040 <os_sort_realnums@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sort_realnums>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
call   1050 <avoid_os_sort@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
test   %rax,%rax
je     1157 <sort_realnums+0x27>
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <spr_sort_realnums@plt>
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <os_sort_realnums@plt>

LLVM IR (-O0):
define void @sort_realnums(double* %0, i32 %1, double* %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca double*
store double* %0, double** %4
store i32 %1, i32* %5
store double* %2, double** %6
%7 = load double*, double** %4
%8 = load i32, i32* %5
%9 = call i64 @avoid_os_sort(double* %7, i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %3
%12 = load double*, double** %4
%13 = load i32, i32* %5
%14 = load double*, double** %6
%15 = call i32 @spr_sort_realnums(double* %12, i32 %13, double* %14)
br label %21
16: ; preds = %3
%17 = load double*, double** %4
%18 = load i32, i32* %5
%19 = load double*, double** %6
%20 = call i32 @os_sort_realnums(double* %17, i32 %18, double* %19)
br label %21
21: ; preds = %16, %11
ret void
}

LLVM IR (-O2):
define void @sort_realnums(double* %0, i32 %1, double* %2) {
%4 = tail call i64 @avoid_os_sort(double* %0, i32 %1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @spr_sort_realnums(double* %0, i32 %1, double* %2)
br label %10
8: ; preds = %3
%9 = tail call i32 @os_sort_realnums(double* %0, i32 %1, double* %2)
br label %10
10: ; preds = %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ file_system_init();
int /*<<< orphan*/ fsdevice_init();
int machine_specific_init();
int /*<<< orphan*/ machine_video_init();
int /*<<< orphan*/ mem_initialize_memory();
int machine_init(void) {
  machine_video_init();
  fsdevice_init();
  file_system_init();
  mem_initialize_memory();
  return machine_specific_init();
}


x86 assembly (clang, -O0):
<machine_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <machine_video_init@plt>
mov    $0x0,%al
call   1040 <fsdevice_init@plt>
mov    $0x0,%al
call   1070 <file_system_init@plt>
mov    $0x0,%al
call   1050 <mem_initialize_memory@plt>
mov    $0x0,%al
call   1030 <machine_specific_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<machine_init>:
push   %rax
xor    %eax,%eax
call   1060 <machine_video_init@plt>
xor    %eax,%eax
call   1040 <fsdevice_init@plt>
xor    %eax,%eax
call   1070 <file_system_init@plt>
xor    %eax,%eax
call   1050 <mem_initialize_memory@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <machine_specific_init@plt>

LLVM IR (-O0):
define i32 @machine_init() {
%1 = call i32 (...) @machine_video_init()
%2 = call i32 (...) @fsdevice_init()
%3 = call i32 (...) @file_system_init()
%4 = call i32 (...) @mem_initialize_memory()
%5 = call i32 (...) @machine_specific_init()
ret i32 %5
}

LLVM IR (-O2):
define i32 @machine_init() {
%1 = tail call i32 (...) @machine_video_init()
%2 = tail call i32 (...) @fsdevice_init()
%3 = tail call i32 (...) @file_system_init()
%4 = tail call i32 (...) @mem_initialize_memory()
%5 = tail call i32 (...) @machine_specific_init()
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
char *strndup(char const *, int /*<<< orphan*/);
char *strdup(const char *str) { return strndup(str, strlen(str)); }


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <strndup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <strndup@plt>

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i8* @strndup(i8* %3, i32 %5)
ret i8* %6
}

LLVM IR (-O2):
define noalias i8* @strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @strndup(i8* %0, i32 %2)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ probeCPUID();
int main(int argc, char **argv) {
  probeCPUID();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @probeCPUID()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @probeCPUID()
ret i32 0
}
int mph_to_kmph(int mph) { return (mph * 1648) / 1024; }


x86 assembly (clang, -O0):
<mph_to_kmph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x670,-0x4(%rbp),%eax
mov    $0x400,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<mph_to_kmph>:
imul   $0x670,%edi,%ecx
lea    0x3ff(%rcx),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0xa,%eax
ret

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

LLVM IR (-O2):
define i32 @mph_to_kmph(i32 %0) {
%2 = mul nsw i32 %0, 1648
%3 = sdiv i32 %2, 1024
ret i32 %3
}
void g_main_context_iteration() {}


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

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

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

LLVM IR (-O2):
define void @g_main_context_iteration() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int x, i;
  scanf("%d", &x);
  for (i = 1; i <= x; i += 2) {
    printf("%d\n", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     116f <main+0x4f>
mov    -0xc(%rbp),%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <main+0x26>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    1163 <main+0x43>
mov    $0x1,%ebx
lea    0xebb(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x2,%ebx
cmp    0x4(%rsp),%ebx
jle    1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 1
br i1 %5, label %12, label %6
6: ; preds = %0, %6
%7 = phi i32 [ %9, %6 ], [ 1, %0 ]
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = add nuw nsw i32 %7, 2
%10 = load i32, i32* %1
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %6
12: ; preds = %6, %0
ret i32 0
}
void xen_console_resume(void) {}


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

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

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

LLVM IR (-O2):
define void @xen_console_resume() {
ret void
}
/* Variables and functions */
int read(int, char *, int);
int /*<<< orphan*/ write(int, char *, int);
int copy(int in, int out) {
  char buf[250];
  int r = read(in, buf, 250);
  while (r != 0) {
    write(out, buf, r);
    r = read(in, buf, 250);
  }
  return 1;
}


x86 assembly (clang, -O0):
<copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x110(%rbp),%rsi
mov    $0xfa,%edx
call   1040 <read@plt>
mov    %eax,-0x114(%rbp)
cmpl   $0x0,-0x114(%rbp)
je     118c <copy+0x6c>
mov    -0x8(%rbp),%edi
lea    -0x110(%rbp),%rsi
mov    -0x114(%rbp),%edx
call   1030 <write@plt>
mov    -0x4(%rbp),%edi
lea    -0x110(%rbp),%rsi
mov    $0xfa,%edx
call   1040 <read@plt>
mov    %eax,-0x114(%rbp)
jmp    114b <copy+0x2b>
mov    $0x1,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy>:
push   %rbp
push   %r14
push   %rbx
sub    $0x100,%rsp
mov    %esi,%r14d
mov    %edi,%ebp
mov    %rsp,%rsi
mov    $0xfa,%edx
call   1040 <read@plt>
test   %eax,%eax
je     1170 <copy+0x50>
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0xfa,%edx
call   1040 <read@plt>
test   %eax,%eax
jne    1150 <copy+0x30>
mov    $0x1,%eax
add    $0x100,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @copy(i32 %0, i32 %1) {
%3 = alloca [250 x i8]
%4 = getelementptr inbounds [250 x i8], [250 x i8]* %3, i64 0, i64 0
%5 = call i32 @read(i32 %0, i8* %4, i32 250)
%6 = icmp eq i32 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %2, %7
%8 = phi i32 [ %10, %7 ], [ %5, %2 ]
%9 = call i32 @write(i32 %1, i8* %4, i32 %8)
%10 = call i32 @read(i32 %0, i8* %4, i32 250)
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %7
12: ; preds = %7, %2
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void Safe_free(void *p) { free(p); }


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

LLVM IR (-O0):
define void @Safe_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 @Safe_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void outsl(unsigned short port, const void *addr, unsigned long count) {
  asm volatile("rep ; outs"
               "l"
               : "=S"(addr), "=c"(count)
               : "d"(port), "0"(addr), "1"(count));
}


x86 assembly (clang, -O0):
<outsl>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
rep outsl %ds:(%rsi),(%dx)
mov    %rsi,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outsl>:
mov    %rdx,%rcx
mov    %edi,%edx
rep outsl %ds:(%rsi),(%dx)
ret

LLVM IR (-O0):
define void @outsl(i16 zeroext %0, i8* %1, i64 %2) {
%4 = alloca i16
%5 = alloca i8*
%6 = alloca i64
store i16 %0, i16* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i16, i16* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call { i8*, i64 } asm sideeffect "rep ; outsl", "={si},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i16 %7, i8* %8, i64 %9)
%11 = extractvalue { i8*, i64 } %10, 0
%12 = extractvalue { i8*, i64 } %10, 1
store i8* %11, i8** %5
store i64 %12, i64* %6
ret void
}

LLVM IR (-O2):
define void @outsl(i16 zeroext %0, i8* %1, i64 %2) {
%4 = tail call { i8*, i64 } asm sideeffect "rep ; outsl", "={si},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i16 %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *malloc(size_t);
int /*<<< orphan*/ warn(char *);
void *emalloc(size_t size) {
  void *m;
  if ((m = malloc(size)) == NULL) {
    warn("malloc");
    abort();
  }
  return m;
}


x86 assembly (clang, -O0):
<emalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    1166 <emalloc+0x36>
lea    0xea6(%rip),%rdi
call   1040 <warn@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emalloc>:
push   %rax
call   1050 <malloc@plt>
test   %rax,%rax
je     113d <emalloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <warn@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"malloc\00"
define i8* @emalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = call i32 @warn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%9 = call i32 (...) @abort()
unreachable
10: ; preds = %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [7 x i8] c"malloc\00"
define noalias i8* @emalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @warn(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %1
ret i8* %2
}
unsigned int funC(unsigned int x) {
  unsigned int res = 1, tmp = x;
  while (tmp) {
    tmp >>= 1;
    res <<= 1;
  }
  if (x == 0 || (x << 1) == res)
    res >>= 1;
  return res;
}


x86 assembly (clang, -O0):
<funC>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1135 <funC+0x35>
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1114 <funC+0x14>
cmpl   $0x0,-0x4(%rbp)
je     114e <funC+0x4e>
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
cmp    -0x8(%rbp),%eax
jne    1157 <funC+0x57>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<funC>:
mov    $0x1,%eax
test   %edi,%edi
je     111b <funC+0x1b>
mov    %edi,%ecx
mov    %edi,%edx
nopl   (%rax)
shr    %edx
add    %eax,%eax
cmp    $0x1,%ecx
mov    %edx,%ecx
ja     1110 <funC+0x10>
test   %edi,%edi
sete   %dl
add    %edi,%edi
cmp    %eax,%edi
sete   %cl
or     %dl,%cl
shr    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @funC(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = phi i32 [ %7, %3 ], [ 1, %1 ]
%6 = lshr i32 %4, 1
%7 = shl i32 %5, 1
%8 = icmp ult i32 %4, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ %7, %3 ]
%11 = shl i32 %0, 1
%12 = icmp eq i32 %11, %10
%13 = select i1 %2, i1 true, i1 %12
%14 = zext i1 %13 to i32
%15 = lshr i32 %10, %14
ret i32 %15
}
void ath_rate_control_unregister(void) {}


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

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

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

LLVM IR (-O2):
define void @ath_rate_control_unregister() {
ret void
}
void reset(int *items, int *_head, int *_tail) {
  *_head = 0;
  *_tail = 0;
}


x86 assembly (clang, -O0):
<reset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset>:
movl   $0x0,(%rsi)
movl   $0x0,(%rdx)
ret

LLVM IR (-O0):
define void @reset(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** %5
store i32 0, i32* %7
%8 = load i32*, i32** %6
store i32 0, i32* %8
ret void
}

LLVM IR (-O2):
define void @reset(i32* nocapture readnone %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
store i32 0, i32* %1
store i32 0, i32* %2
ret void
}
/* Type definitions */
struct timespec {
  int dummy;
};
typedef int /*<<< orphan*/ pthread_rwlock_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *);
int pthread_rwlock_timedwrlock(pthread_rwlock_t *l, const struct timespec *ts) {
  printf("FIXME: pthread_rwlock_timedwrlock implemented without timeout.\n");
  abort();
}


x86 assembly (clang, -O0):
<pthread_rwlock_timedwrlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<pthread_rwlock_timedwrlock>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@.str = [64 x i8] c"FIXME: pthread_rwlock_timedwrlock implemented without timeout.\0A\00"
define i32 @pthread_rwlock_timedwrlock(i32* %0, %struct.timespec* %1) {
%3 = alloca i32*
%4 = alloca %struct.timespec*
store i32* %0, i32** %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@str = [63 x i8] c"FIXME: pthread_rwlock_timedwrlock implemented without timeout.\00"
define i32 @pthread_rwlock_timedwrlock(i32* nocapture readnone %0, %struct.timespec* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xee() {
  Assert_real((isascii(238) == 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",
              1195, ("isascii should be 0 for 0xee"));
}


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

x86 assembly (clang, -O2):
<t_isascii_0xee>:
push   %rax
mov    $0xee,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4ab,%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 0xee\00"
define void @t_isascii_0xee() {
%1 = call i64 @isascii(i32 238)
%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 1195, 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 0xee\00"
define void @t_isascii_0xee() {
%1 = tail call i64 @isascii(i32 238)
%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 1195, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
void assert(_Bool arg) {
  if (!arg) {
  ERROR:
    __VERIFIER_error();
  }
}


x86 assembly (clang, -O0):
<assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
testb  $0x1,-0x1(%rbp)
jne    1136 <assert+0x26>
jmp    112f <assert+0x1f>
mov    $0x0,%al
call   1030 <__VERIFIER_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert>:
test   %edi,%edi
je     1115 <assert+0x5>
ret
xor    %eax,%eax
jmp    1030 <__VERIFIER_error@plt>

LLVM IR (-O0):
define void @assert(i1 zeroext %0) {
%2 = alloca i8
%3 = zext i1 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = trunc i8 %4 to i1
br i1 %5, label %9, label %6
6: ; preds = %1
br label %7
7: ; preds = %6
%8 = call i32 (...) @__VERIFIER_error()
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @assert(i1 zeroext %0) {
br i1 %0, label %4, label %2
2: ; preds = %1
%3 = tail call i32 (...) @__VERIFIER_error()
br label %4
4: ; preds = %2, %1
ret void
}
void foo383(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo383(i32 %0) {
ret void
}