xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ pipe(int *);
int main(int argc, char **argv) {
  int fds[2];
  {
    int i;
    for (i = 3; i < 64; i++)
      close(i);
  };
  pipe(fds);
  return 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)
movl   $0x3,-0x1c(%rbp)
cmpl   $0x40,-0x1c(%rbp)
jge    115d <main+0x3d>
mov    -0x1c(%rbp),%edi
call   1030 <close@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    113d <main+0x1d>
lea    -0x18(%rbp),%rdi
call   1040 <pipe@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    $0x3,%ebx
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <close@plt>
add    $0x1,%ebx
cmp    $0x40,%ebx
jne    1130 <main+0x10>
lea    0x8(%rsp),%rdi
call   1040 <pipe@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [2 x i32]
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 3, i32* %7
br label %8
8: ; preds = %14, %2
%9 = load i32, i32* %7
%10 = icmp slt i32 %9, 64
br i1 %10, label %11, label %17
11: ; preds = %8
%12 = load i32, i32* %7
%13 = call i32 @close(i32 %12)
br label %14
14: ; preds = %11
%15 = load i32, i32* %7
%16 = add nsw i32 %15, 1
store i32 %16, i32* %7
br label %8
17: ; preds = %8
%18 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%19 = call i32 @pipe(i32* %18)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [2 x i32]
%4 = bitcast [2 x i32]* %3 to i8*
br label %5
5: ; preds = %2, %5
%6 = phi i32 [ 3, %2 ], [ %8, %5 ]
%7 = tail call i32 @close(i32 %6)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, 64
br i1 %9, label %10, label %5
10: ; preds = %5
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%12 = call i32 @pipe(i32* %11)
ret i32 0
}
void SSMR3GetU8(void) {}


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

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

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

LLVM IR (-O2):
define void @SSMR3GetU8() {
ret void
}
/* Type definitions */
typedef int mode_t;

/* Variables and functions */
mode_t umask(mode_t mode) { return 0777; }


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

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

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

LLVM IR (-O2):
define i32 @umask(i32 %0) {
ret i32 511
}
/* Variables and functions */
char *kmalloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, int);
char *strdupdelim(const char *beg, const char *end) {
  char *res;
  res = kmalloc(end - beg + 1);
  memcpy(res, beg, end - beg);
  res[end - beg] = '\0';
  return res;
}


x86 assembly (clang, -O0):
<strdupdelim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
add    $0x1,%rax
mov    %eax,%edi
call   1040 <kmalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rdx
sub    %rdx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdupdelim>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
sub    %rdi,%rbx
lea    0x1(%rbx),%edi
call   1040 <kmalloc@plt>
mov    %rax,%r15
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1030 <memcpy@plt>
movb   $0x0,(%r15,%rbx,1)
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @strdupdelim(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = ptrtoint i8* %6 to i64
%9 = ptrtoint i8* %7 to i64
%10 = sub i64 %8, %9
%11 = add nsw i64 %10, 1
%12 = trunc i64 %11 to i32
%13 = call i8* @kmalloc(i32 %12)
store i8* %13, i8** %5
%14 = load i8*, i8** %5
%15 = load i8*, i8** %3
%16 = load i8*, i8** %4
%17 = load i8*, i8** %3
%18 = ptrtoint i8* %16 to i64
%19 = ptrtoint i8* %17 to i64
%20 = sub i64 %18, %19
%21 = trunc i64 %20 to i32
%22 = call i32 @memcpy(i8* %14, i8* %15, i32 %21)
%23 = load i8*, i8** %5
%24 = load i8*, i8** %4
%25 = load i8*, i8** %3
%26 = ptrtoint i8* %24 to i64
%27 = ptrtoint i8* %25 to i64
%28 = sub i64 %26, %27
%29 = getelementptr inbounds i8, i8* %23, i64 %28
store i8 0, i8* %29
%30 = load i8*, i8** %5
ret i8* %30
}

LLVM IR (-O2):
define i8* @strdupdelim(i8* %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = ptrtoint i8* %0 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
%7 = add i32 %6, 1
%8 = tail call i8* @kmalloc(i32 %7)
%9 = tail call i32 @memcpy(i8* %8, i8* %0, i32 %6)
%10 = getelementptr inbounds i8, i8* %8, i64 %5
store i8 0, i8* %10
ret i8* %8
}
main(ac, av) char **av;
{ execv("/usr/local/bin/private/sendmail.pl", av); }


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"/usr/local/bin/private/sendmail.pl\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i8**, i8*** %4
%6 = call i32 (i8*, i8**, ...) bitcast (i32 (...)* @execv to i32 (i8*, i8**, ...)*)(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8** %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"/usr/local/bin/private/sendmail.pl\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (i8*, i8**, ...) bitcast (i32 (...)* @execv to i32 (i8*, i8**, ...)*)(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8** %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct wl_resource {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_resource_post_event(struct wl_resource *, int,
                                          int /*<<< orphan*/);
void wl_data_source_send_action(struct wl_resource *resource_,
                                uint32_t dnd_action) {
  wl_resource_post_event(resource_, 5, dnd_action);
}


x86 assembly (clang, -O0):
<wl_data_source_send_action>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    $0x5,%esi
call   1030 <wl_resource_post_event@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wl_data_source_send_action>:
mov    %esi,%edx
mov    $0x5,%esi
jmp    1030 <wl_resource_post_event@plt>

LLVM IR (-O0):
%struct.wl_resource = type { i32 }
define void @wl_data_source_send_action(%struct.wl_resource* %0, i32 %1) {
%3 = alloca %struct.wl_resource*
%4 = alloca i32
store %struct.wl_resource* %0, %struct.wl_resource** %3
store i32 %1, i32* %4
%5 = load %struct.wl_resource*, %struct.wl_resource** %3
%6 = load i32, i32* %4
%7 = call i32 @wl_resource_post_event(%struct.wl_resource* %5, i32 5, i32 %6)
ret void
}

LLVM IR (-O2):
%struct.wl_resource = type { i32 }
define void @wl_data_source_send_action(%struct.wl_resource* %0, i32 %1) {
%3 = tail call i32 @wl_resource_post_event(%struct.wl_resource* %0, i32 5, i32 %1)
ret void
}
/* Variables and functions */
bool nrf52_errata_113(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_113() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ insTerra();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
void creaPercorso() {
  int sc;
  printf("Benvenuti nella funzione crea percorso!\n\n0 - Inserisci terra\n1 - "
         "Cancella terra\n2 - Stampa percorso\n3 - Chiudi percorso\n");
  scanf("%d", &sc);
  if (sc == 1) {
    insTerra();
  }
}


x86 assembly (clang, -O0):
<creaPercorso>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
lea    0xf2e(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,-0x4(%rbp)
jne    1165 <creaPercorso+0x35>
mov    $0x0,%al
call   1050 <insTerra@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<creaPercorso>:
push   %rax
lea    0xecb(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x1,0x4(%rsp)
jne    115c <creaPercorso+0x2c>
xor    %eax,%eax
call   1050 <insTerra@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [121 x i8] c"Benvenuti nella funzione crea percorso!\0A\0A0 - Inserisci terra\0A1 - Cancella terra\0A2 - Stampa percorso\0A3 - Chiudi percorso\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define void @creaPercorso() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([121 x i8], [121 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @insTerra()
br label %8
8: ; preds = %6, %0
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [120 x i8] c"Benvenuti nella funzione crea percorso!\0A\0A0 - Inserisci terra\0A1 - Cancella terra\0A2 - Stampa percorso\0A3 - Chiudi percorso\00"
define void @creaPercorso() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([120 x i8], [120 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 (...) @insTerra()
br label %9
9: ; preds = %7, %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ readfileinreverse(int /*<<< orphan*/ *);
int main(int argc, char *argv[]) {
  char *file_name;
  file_name = argv[1];
  FILE *fp = fopen(file_name, "r");
  readfileinreverse(fp);
  return 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    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xeb3(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <readfileinreverse@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
lea    0xed4(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rdi
call   1030 <readfileinreverse@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
store i8* %10, i8** %6
%11 = load i8*, i8** %6
%12 = call i32* @fopen(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %12, i32** %7
%13 = load i32*, i32** %7
%14 = call i32 @readfileinreverse(i32* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32* @fopen(i8* %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @readfileinreverse(i32* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void misc_free_invited_chats(void *data) {
  int *t;
  t = (int *)data;
  free(t);
}


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

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

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

LLVM IR (-O2):
define void @misc_free_invited_chats(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @free(i32* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "use like this: ex7 directory\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"use like this: ex7 directory\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"use like this: ex7 directory\0A\00"
@EXIT_FAILURE = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
struct sembuf {
  int member_0;
  int member_1;
  int /*<<< orphan*/ member_2;
};

/* Variables and functions */
int semop(int, struct sembuf *, int);
int lock(int sem_id, int sem_num) {
  struct sembuf command = {sem_num, -1, 0};
  return semop(sem_id, &command, 1);
}


x86 assembly (clang, -O0):
<lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
movl   $0xffffffff,-0x14(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lock>:
sub    $0x18,%rsp
mov    %esi,0x8(%rsp)
mov    $0xffffffff,%eax
mov    %rax,0xc(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i32, i32 }
define i32 @lock(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sembuf
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 0
%7 = load i32, i32* %4
store i32 %7, i32* %6
%8 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 1
store i32 -1, i32* %8
%9 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 2
store i32 0, i32* %9
%10 = load i32, i32* %3
%11 = call i32 @semop(i32 %10, %struct.sembuf* %5, i32 1)
ret i32 %11
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i32, i32 }
define i32 @lock(i32 %0, i32 %1) {
%3 = alloca %struct.sembuf
%4 = bitcast %struct.sembuf* %3 to i8*
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 0
store i32 %1, i32* %5
%6 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 1
store i32 -1, i32* %6
%7 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 2
store i32 0, i32* %7
%8 = call i32 @semop(i32 %0, %struct.sembuf* %3, i32 1)
ret i32 %8
}
/* Type definitions */
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double ne_timef(void) {
  double f = 0;
  struct timeval tv;
  int ret;
  ret = gettimeofday(&tv, NULL);
  if (ret == 0) {
    f = tv.tv_sec + (tv.tv_usec / 1000000.0);
  }
  return f;
}


x86 assembly (clang, -O0):
<ne_timef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
lea    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1159 <ne_timef+0x49>
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xeb4(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ne_timef>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
xorps  %xmm0,%xmm0
test   %eax,%eax
je     112c <ne_timef+0x1c>
add    $0x18,%rsp
ret
movsd  0x10(%rsp),%xmm0
divsd  0xec6(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
define double @ne_timef() {
%1 = alloca double
%2 = alloca %struct.timeval
%3 = alloca i32
store double 0.000000e+00, double* %1
%4 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
store i32 %4, i32* %3
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %0
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%9 = load double, double* %8
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%11 = load double, double* %10
%12 = fdiv double %11, 1.000000e+06
%13 = fadd double %9, %12
store double %13, double* %1
br label %14
14: ; preds = %7, %0
%15 = load double, double* %1
ret double %15
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define double @ne_timef() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %0
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%7 = load double, double* %6
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load double, double* %8
%10 = fdiv double %9, 1.000000e+06
%11 = fadd double %7, %10
br label %12
12: ; preds = %5, %0
%13 = phi double [ %11, %5 ], [ 0.000000e+00, %0 ]
ret double %13
}
/* Variables and functions */
int mysystem(char *);
int main(int argc, char *argv[]) { return mysystem(argv[1]); }


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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <mysystem@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    0x8(%rsi),%rdi
jmp    1030 <mysystem@plt>

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 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @mysystem(i8* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @mysystem(i8* %4)
ret i32 %5
}
void yy_1_ExternalLinkAutoCorrect(char *yytext, int yyleng) {
  ;
  ;
}


x86 assembly (clang, -O0):
<yy_1_ExternalLinkAutoCorrect>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @yy_1_ExternalLinkAutoCorrect(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int mf_fstrnlen(char *, unsigned int);
void setcstrasfstr(char **pcString, char *fString, unsigned lenf) {
  unsigned i = 0;
  int l;
  l = mf_fstrnlen(fString, lenf);
  *pcString = fString;
  *pcString[(l < lenf ? l : lenf - 1)] = '\0';
  return;
}


x86 assembly (clang, -O0):
<setcstrasfstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <mf_fstrnlen@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jae    1163 <setcstrasfstr+0x53>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    116c <setcstrasfstr+0x5c>
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x2c(%rbp),%ecx
mov    %ecx,%ecx
mov    (%rax,%rcx,8),%rax
movb   $0x0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setcstrasfstr>:
push   %r15
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %rsi,%rdi
mov    %edx,%esi
call   1030 <mf_fstrnlen@plt>
mov    %r14,(%r15)
lea    -0x1(%rbx),%ecx
cmp    %ebx,%eax
cmovb  %eax,%ecx
mov    (%r15,%rcx,8),%rax
movb   $0x0,(%rax)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @setcstrasfstr(i8** %0, i8* %1, i32 %2) {
%4 = alloca i8**
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8** %0, i8*** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
store i32 0, i32* %7
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @mf_fstrnlen(i8* %9, i32 %10)
store i32 %11, i32* %8
%12 = load i8*, i8** %5
%13 = load i8**, i8*** %4
store i8* %12, i8** %13
%14 = load i8**, i8*** %4
%15 = load i32, i32* %8
%16 = load i32, i32* %6
%17 = icmp ult i32 %15, %16
br i1 %17, label %18, label %20
18: ; preds = %3
%19 = load i32, i32* %8
br label %23
20: ; preds = %3
%21 = load i32, i32* %6
%22 = sub i32 %21, 1
br label %23
23: ; preds = %20, %18
%24 = phi i32 [ %19, %18 ], [ %22, %20 ]
%25 = zext i32 %24 to i64
%26 = getelementptr inbounds i8*, i8** %14, i64 %25
%27 = load i8*, i8** %26
store i8 0, i8* %27
ret void
}

LLVM IR (-O2):
define void @setcstrasfstr(i8** nocapture %0, i8* %1, i32 %2) {
%4 = tail call i32 @mf_fstrnlen(i8* %1, i32 %2)
store i8* %1, i8** %0
%5 = icmp ult i32 %4, %2
%6 = add i32 %2, -1
%7 = select i1 %5, i32 %4, i32 %6
%8 = zext i32 %7 to i64
%9 = getelementptr inbounds i8*, i8** %0, i64 %8
%10 = load i8*, i8** %9
store i8 0, i8* %10
ret void
}
void SSL_read(void) {}


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

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

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

LLVM IR (-O2):
define void @SSL_read() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ BPF_MAP_TYPE_HASH;
int bpf_create_map(int /*<<< orphan*/, int, int, int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *, char *);
char *strerror(int /*<<< orphan*/);
int create_map(void) {
  int map_fd;
  map_fd = bpf_create_map(BPF_MAP_TYPE_HASH, sizeof(long long),
                          sizeof(long long), 1024);
  if (map_fd < 0)
    printf("failed to create map '%s'\n", strerror(errno));
  return map_fd;
}


x86 assembly (clang, -O0):
<create_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
mov    $0x8,%edx
mov    $0x400,%ecx
mov    %edx,%esi
call   1040 <bpf_create_map@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    117c <create_map+0x4c>
mov    0x2e72(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    %rax,%rsi
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<create_map>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
mov    $0x8,%esi
mov    $0x8,%edx
mov    $0x400,%ecx
call   1040 <bpf_create_map@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1171 <create_map+0x41>
mov    0x2e7d(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xe97(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@BPF_MAP_TYPE_HASH = global i32 0
@.str = [27 x i8] c"failed to create map '%s'\0A\00"
@errno = global i32 0
define i32 @create_map() {
%1 = alloca i32
%2 = load i32, i32* @BPF_MAP_TYPE_HASH
%3 = call i32 @bpf_create_map(i32 %2, i32 8, i32 8, i32 1024)
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %0
%7 = load i32, i32* @errno
%8 = call i8* @strerror(i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %6, %0
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@BPF_MAP_TYPE_HASH = global i32 0
@.str = [27 x i8] c"failed to create map '%s'\0A\00"
@errno = global i32 0
define i32 @create_map() {
%1 = load i32, i32* @BPF_MAP_TYPE_HASH
%2 = tail call i32 @bpf_create_map(i32 %1, i32 8, i32 8, i32 1024)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load i32, i32* @errno
%6 = tail call i8* @strerror(i32 %5)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %8
8: ; preds = %4, %0
ret i32 %2
}
/* Variables and functions */
double sqrt(double);
double ch_norm(double *vec, int beg, int end) {
  double dot(double *vec1, int beg, int end, double *vec2);
  return (sqrt(dot(vec, beg, end, vec)));
}


x86 assembly (clang, -O0):
<ch_norm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rcx
call   1030 <dot@plt>
call   1040 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ch_norm>:
push   %rax
mov    %rdi,%rcx
call   1030 <dot@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1139 <ch_norm+0x19>
sqrtsd %xmm0,%xmm0
pop    %rax
ret
pop    %rax
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @ch_norm(double* %0, i32 %1, i32 %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
store double* %0, double** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load double*, double** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = load double*, double** %4
%11 = call double @dot(double* %7, i32 %8, i32 %9, double* %10)
%12 = call double @sqrt(double %11)
ret double %12
}

LLVM IR (-O2):
define double @ch_norm(double* %0, i32 %1, i32 %2) {
%4 = tail call double @dot(double* %0, i32 %1, i32 %2, double* %0)
%5 = tail call double @sqrt(double %4)
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ __ESBMC_check_stability(float *, float *);
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int main() {
  float a[] = {1.000000000000000, -1.968750000000000, 0.968750000000000};
  float b[] = {0, 0, 0};
  assert(__ESBMC_check_stability(a, b));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xeb8(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x1c(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1040 <memset@plt>
lea    -0x10(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1030 <__ESBMC_check_stability@plt>
mov    %eax,%edi
call   1050 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xede(%rip),%eax
mov    %eax,0x20(%rsp)
mov    0xecb(%rip),%rax
mov    %rax,0x18(%rsp)
movl   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
lea    0x18(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <__ESBMC_check_stability@plt>
mov    %eax,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [3 x float] [float 1.000000e+00, float -1.968750e+00, float 9.687500e-01]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x float]
%3 = alloca [3 x float]
store i32 0, i32* %1
%4 = bitcast [3 x float]* %2 to i8*
%5 = bitcast [3 x float]* %3 to i8*
%6 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 0
%7 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 0
%8 = call i32 @__ESBMC_check_stability(float* %6, float* %7)
%9 = call i32 @assert(i32 %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [3 x float] [float 1.000000e+00, float -1.968750e+00, float 9.687500e-01]
define i32 @main() {
%1 = alloca [3 x float]
%2 = alloca [3 x float]
%3 = bitcast [3 x float]* %1 to i8*
%4 = bitcast [3 x float]* %2 to i8*
%5 = getelementptr inbounds [3 x float], [3 x float]* %1, i64 0, i64 0
%6 = getelementptr inbounds [3 x float], [3 x float]* %2, i64 0, i64 0
%7 = call i32 @__ESBMC_check_stability(float* %5, float* %6)
%8 = call i32 @assert(i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ func1();
int /*<<< orphan*/ func2();
int /*<<< orphan*/ printf(char *);
int main() {
  int i, j, k, l, m;
  if (i != 0) {
    if (j != 1) {
      if (k != 2) {
        printf("1\n");
      } else {
        printf("2\n");
      }
    } else {
      printf("3\n");
    }
  } else {
    printf("4\n");
  }
  func1();
  func2();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1190 <main+0x60>
cmpl   $0x1,-0xc(%rbp)
je     117f <main+0x4f>
cmpl   $0x2,-0x10(%rbp)
je     116e <main+0x3e>
lea    0xe9c(%rip),%rdi
call   1040 <printf@plt>
jmp    117a <main+0x4a>
lea    0xe8e(%rip),%rdi
call   1040 <printf@plt>
jmp    118b <main+0x5b>
lea    0xe80(%rip),%rdi
call   1040 <printf@plt>
jmp    119c <main+0x6c>
lea    0xe72(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <func1@plt>
mov    $0x0,%al
call   1050 <func2@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"1\0A\00"
@.str.1 = [3 x i8] c"2\0A\00"
@.str.2 = [3 x i8] c"3\0A\00"
@.str.3 = [3 x i8] c"4\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %23
9: ; preds = %0
%10 = load i32, i32* %3
%11 = icmp ne i32 %10, 1
br i1 %11, label %12, label %20
12: ; preds = %9
%13 = load i32, i32* %4
%14 = icmp ne i32 %13, 2
br i1 %14, label %15, label %17
15: ; preds = %12
%16 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %19
17: ; preds = %12
%18 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
br label %19
19: ; preds = %17, %15
br label %22
20: ; preds = %9
%21 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %22
22: ; preds = %20, %19
br label %25
23: ; preds = %0
%24 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %25
25: ; preds = %23, %22
%26 = call i32 (...) @func1()
%27 = call i32 (...) @func2()
ret i32 0
}

LLVM IR (-O2):
@str = [2 x i8] c"4\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @func1()
%3 = tail call i32 (...) @func2()
ret i32 0
}
/* Variables and functions */
scalar_t__ sshkey_perm_ok(int, char const *);
int key_perm_ok(int fd, const char *filename) {
  return sshkey_perm_ok(fd, filename) == 0 ? 1 : 0;
}


x86 assembly (clang, -O0):
<key_perm_ok>:
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 <sshkey_perm_ok@plt>
mov    %rax,%rdx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<key_perm_ok>:
push   %rax
call   1030 <sshkey_perm_ok@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @key_perm_ok(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = call i64 @sshkey_perm_ok(i32 %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 1, i32 0
ret i32 %10
}

LLVM IR (-O2):
define i32 @key_perm_ok(i32 %0, i8* %1) {
%3 = tail call i64 @sshkey_perm_ok(i32 %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int16_t ffi_reinterpret_int16_t(void *result) { return (int16_t)result; }


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

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

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

LLVM IR (-O2):
define i32 @ffi_reinterpret_int16_t(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Type definitions */
struct RNAsnoop_args_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ clear_args(struct RNAsnoop_args_info *);
int /*<<< orphan*/ clear_given(struct RNAsnoop_args_info *);
int /*<<< orphan*/ init_args_info(struct RNAsnoop_args_info *);
void RNAsnoop_cmdline_parser_init(struct RNAsnoop_args_info *args_info) {
  clear_given(args_info);
  clear_args(args_info);
  init_args_info(args_info);
}


x86 assembly (clang, -O0):
<RNAsnoop_cmdline_parser_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <clear_given@plt>
mov    -0x8(%rbp),%rdi
call   1030 <clear_args@plt>
mov    -0x8(%rbp),%rdi
call   1050 <init_args_info@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNAsnoop_cmdline_parser_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <clear_given@plt>
mov    %rbx,%rdi
call   1030 <clear_args@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <init_args_info@plt>

LLVM IR (-O0):
%struct.RNAsnoop_args_info = type { i32 }
define void @RNAsnoop_cmdline_parser_init(%struct.RNAsnoop_args_info* %0) {
%2 = alloca %struct.RNAsnoop_args_info*
store %struct.RNAsnoop_args_info* %0, %struct.RNAsnoop_args_info** %2
%3 = load %struct.RNAsnoop_args_info*, %struct.RNAsnoop_args_info** %2
%4 = call i32 @clear_given(%struct.RNAsnoop_args_info* %3)
%5 = load %struct.RNAsnoop_args_info*, %struct.RNAsnoop_args_info** %2
%6 = call i32 @clear_args(%struct.RNAsnoop_args_info* %5)
%7 = load %struct.RNAsnoop_args_info*, %struct.RNAsnoop_args_info** %2
%8 = call i32 @init_args_info(%struct.RNAsnoop_args_info* %7)
ret void
}

LLVM IR (-O2):
%struct.RNAsnoop_args_info = type { i32 }
define void @RNAsnoop_cmdline_parser_init(%struct.RNAsnoop_args_info* %0) {
%2 = tail call i32 @clear_given(%struct.RNAsnoop_args_info* %0)
%3 = tail call i32 @clear_args(%struct.RNAsnoop_args_info* %0)
%4 = tail call i32 @init_args_info(%struct.RNAsnoop_args_info* %0)
ret void
}
int saxpy(int N, float DA, float *DX, int INCX, float *DY, int INCY) {
  extern int saxpy_(int *N, float *DA, float *DX, int *INCX, float *DY,
                    int *INCY);
  return saxpy_(&N, &DA, DX, &INCX, DY, &INCY);
}


x86 assembly (clang, -O0):
<saxpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%r8
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
lea    -0x14(%rbp),%rcx
lea    -0x24(%rbp),%r9
call   1030 <saxpy_@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<saxpy>:
sub    $0x18,%rsp
mov    %rcx,%r10
mov    %rsi,%rax
mov    %edi,0x14(%rsp)
movss  %xmm0,0x10(%rsp)
mov    %edx,0xc(%rsp)
mov    %r8d,0x8(%rsp)
lea    0x14(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r9
mov    %rax,%rdx
mov    %r10,%r8
call   1030 <saxpy_@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @saxpy(i32 %0, float %1, float* %2, i32 %3, float* %4, i32 %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float*
%10 = alloca i32
%11 = alloca float*
%12 = alloca i32
store i32 %0, i32* %7
store float %1, float* %8
store float* %2, float** %9
store i32 %3, i32* %10
store float* %4, float** %11
store i32 %5, i32* %12
%13 = load float*, float** %9
%14 = load float*, float** %11
%15 = call i32 @saxpy_(i32* %7, float* %8, float* %13, i32* %10, float* %14, i32* %12)
ret i32 %15
}

LLVM IR (-O2):
define i32 @saxpy(i32 %0, float %1, float* %2, i32 %3, float* %4, i32 %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %7
store float %1, float* %8
store i32 %3, i32* %9
store i32 %5, i32* %10
%11 = call i32 @saxpy_(i32* %7, float* %8, float* %2, i32* %9, float* %4, i32* %10)
ret i32 %11
}
void clientsCron(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
long ftell(int /*<<< orphan*/ *);
long filesize(FILE *stream) {
  long curpos, length;
  curpos = ftell(stream);
  fseek(stream, 0L, SEEK_END);
  length = ftell(stream);
  fseek(stream, curpos, SEEK_SET);
  return length;
}


x86 assembly (clang, -O0):
<filesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2e6d(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filesize>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %rax,%r14
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %rax,%r15
mov    0x2e83(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <fseek@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @filesize(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
%4 = alloca i64
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i64 @ftell(i32* %5)
store i64 %6, i64* %3
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i64 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i64 @ftell(i32* %10)
store i64 %11, i64* %4
%12 = load i32*, i32** %2
%13 = load i64, i64* %3
%14 = load i32, i32* @SEEK_SET
%15 = call i32 @fseek(i32* %12, i64 %13, i32 %14)
%16 = load i64, i64* %4
ret i64 %16
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i64 @filesize(i32* nocapture %0) {
%2 = tail call i64 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i64 0, i32 %3)
%5 = tail call i64 @ftell(i32* %0)
%6 = load i32, i32* @SEEK_SET
%7 = tail call i32 @fseek(i32* %0, i64 %2, i32 %6)
ret i64 %5
}
void VecSelfAdd3iv(int v[3], int s) {
  v[0] += s;
  v[1] += s;
  v[2] += s;
}


x86 assembly (clang, -O0):
<VecSelfAdd3iv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
add    0x4(%rax),%ecx
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
add    0x8(%rax),%ecx
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<VecSelfAdd3iv>:
add    %esi,(%rdi)
add    %esi,0x4(%rdi)
add    %esi,0x8(%rdi)
ret

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

LLVM IR (-O2):
define void @VecSelfAdd3iv(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = add nsw i32 %3, %1
store i32 %4, i32* %0
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = add nsw i32 %6, %1
store i32 %7, i32* %5
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = add nsw i32 %9, %1
store i32 %10, i32* %8
ret void
}
int nbcnt_(int *lpl, int *lptr) {
  int ret_val;
  static int k, lp;
  --lptr;
  lp = *lpl;
  k = 1;
L1:
  lp = lptr[lp];
  if (lp == *lpl) {
    goto L2;
  }
  ++k;
  goto L1;
L2:
  ret_val = k;
  return ret_val;
}


x86 assembly (clang, -O0):
<nbcnt_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,0x2f04(%rip)
movl   $0x1,0x2ef6(%rip)
mov    -0x10(%rbp),%rax
movslq 0x2eef(%rip),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,0x2ee6(%rip)
mov    0x2ee0(%rip),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jne    1159 <nbcnt_+0x59>
jmp    116d <nbcnt_+0x6d>
mov    0x2ec5(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ebc(%rip)
jmp    112e <nbcnt_+0x2e>
mov    0x2eb1(%rip),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nbcnt_>:
mov    (%rdi),%ecx
xor    %eax,%eax
mov    %ecx,%edx
cs nopw 0x0(%rax,%rax,1)
movslq %edx,%rdx
mov    -0x4(%rsi,%rdx,4),%edx
add    $0x1,%eax
cmp    %ecx,%edx
jne    1110 <nbcnt_+0x10>
ret

LLVM IR (-O0):
@nbcnt_.k = internal global i32 0
@nbcnt_.lp = internal global i32 0
define i32 @nbcnt_(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = getelementptr inbounds i32, i32* %6, i32 -1
store i32* %7, i32** %4
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
store i32 %9, i32* @nbcnt_.lp
store i32 1, i32* @nbcnt_.k
br label %10
10: ; preds = %21, %2
%11 = load i32*, i32** %4
%12 = load i32, i32* @nbcnt_.lp
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
store i32 %15, i32* @nbcnt_.lp
%16 = load i32, i32* @nbcnt_.lp
%17 = load i32*, i32** %3
%18 = load i32, i32* %17
%19 = icmp eq i32 %16, %18
br i1 %19, label %20, label %21
20: ; preds = %10
br label %24
21: ; preds = %10
%22 = load i32, i32* @nbcnt_.k
%23 = add nsw i32 %22, 1
store i32 %23, i32* @nbcnt_.k
br label %10
24: ; preds = %20
%25 = load i32, i32* @nbcnt_.k
store i32 %25, i32* %5
%26 = load i32, i32* %5
ret i32 %26
}

LLVM IR (-O2):
define i32 @nbcnt_(i32* nocapture %0, i32* nocapture %1) {
%3 = getelementptr inbounds i32, i32* %1, i64 -1
%4 = load i32, i32* %0
br label %5
5: ; preds = %5, %2
%6 = phi i32 [ %4, %2 ], [ %10, %5 ]
%7 = phi i32 [ 1, %2 ], [ %12, %5 ]
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds i32, i32* %3, i64 %8
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, %4
%12 = add nuw nsw i32 %7, 1
br i1 %11, label %13, label %5
13: ; preds = %5
ret i32 %7
}
int umath_int_abs(int value) { return value >= 0 ? value : (-value); }


x86 assembly (clang, -O0):
<umath_int_abs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     111c <umath_int_abs+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1124 <umath_int_abs+0x24>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @umath_int_abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Type definitions */
struct hostent {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type) {
  ;
  errno = ENOSYS;
  return NULL;
  ;
}


x86 assembly (clang, -O0):
<gethostbyaddr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    0x2ed3(%rip),%rax
mov    (%rax),%ecx
mov    0x2eba(%rip),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gethostbyaddr>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.hostent = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define %struct.hostent* @gethostbyaddr(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* @ENOSYS
store i32 %7, i32* @errno
ret %struct.hostent* null
}

LLVM IR (-O2):
%struct.hostent = type { i32 }
@ENOSYS = global i32 0
@errno = global i32 0
define noalias %struct.hostent* @gethostbyaddr(i8* nocapture readnone %0, i32 %1, i32 %2) {
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret %struct.hostent* null
}