xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void fnewline(FILE *out) {
  if (out != NULL)
    fprintf(out, "\n");
  return;
}


x86 assembly (clang, -O0):
<fnewline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1137 <fnewline+0x27>
mov    -0x8(%rbp),%rdi
lea    0xece(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fnewline>:
test   %rdi,%rdi
je     1122 <fnewline+0x12>
mov    %rdi,%rsi
mov    $0xa,%edi
jmp    1030 <fputc@plt>
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @fnewline(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp ne i32* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32*, i32** %2
%7 = call i32 @fprintf(i32* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @fnewline(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @fputc(i32 10, i32* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void textout(char *str) { fprintf(stderr, "%s", str); }


x86 assembly (clang, -O0):
<textout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<textout>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @textout(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct ipv6_opt_hdr {
  int hdrlen;
};

/* Variables and functions */
int ipv6_authlen(struct ipv6_opt_hdr *opthdr) {
  return (opthdr->hdrlen + 2) << 2;
}


x86 assembly (clang, -O0):
<ipv6_authlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x2,%eax
shl    $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv6_authlen>:
mov    (%rdi),%eax
lea    0x8(,%rax,4),%eax
ret

LLVM IR (-O0):
%struct.ipv6_opt_hdr = type { i32 }
define i32 @ipv6_authlen(%struct.ipv6_opt_hdr* %0) {
%2 = alloca %struct.ipv6_opt_hdr*
store %struct.ipv6_opt_hdr* %0, %struct.ipv6_opt_hdr** %2
%3 = load %struct.ipv6_opt_hdr*, %struct.ipv6_opt_hdr** %2
%4 = getelementptr inbounds %struct.ipv6_opt_hdr, %struct.ipv6_opt_hdr* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = add nsw i32 %5, 2
%7 = shl i32 %6, 2
ret i32 %7
}

LLVM IR (-O2):
%struct.ipv6_opt_hdr = type { i32 }
define i32 @ipv6_authlen(%struct.ipv6_opt_hdr* nocapture %0) {
%2 = getelementptr inbounds %struct.ipv6_opt_hdr, %struct.ipv6_opt_hdr* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = shl i32 %3, 2
%5 = add i32 %4, 8
ret i32 %5
}
int do_220() { return 220; }


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

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

LLVM IR (-O0):
define i32 @do_220() {
ret i32 220
}

LLVM IR (-O2):
define i32 @do_220() {
ret i32 220
}
/* Variables and functions */
int strlen(char *);
int ipv6_format(char *str) {
  int pos = strlen(str) - 1;
  int rc = 0;
  if (str[pos] == ']') {
    str[pos] = '\0';
    rc = pos;
  }
  return rc;
}


x86 assembly (clang, -O0):
<ipv6_format>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5d,%eax
jne    1159 <ipv6_format+0x49>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv6_format>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%rcx
xor    %eax,%eax
cmpb   $0x5d,-0x1(%rbx,%rcx,1)
jne    112f <ipv6_format+0x1f>
add    $0xffffffffffffffff,%rcx
movb   $0x0,(%rbx,%rcx,1)
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ipv6_format(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = sub nsw i32 %6, 1
store i32 %7, i32* %3
store i32 0, i32* %4
%8 = load i8*, i8** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %8, i64 %10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 93
br i1 %14, label %15, label %21
15: ; preds = %1
%16 = load i8*, i8** %2
%17 = load i32, i32* %3
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i8, i8* %16, i64 %18
store i8 0, i8* %19
%20 = load i32, i32* %3
store i32 %20, i32* %4
br label %21
21: ; preds = %15, %1
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
define i32 @ipv6_format(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 93
br i1 %7, label %8, label %9
8: ; preds = %1
store i8 0, i8* %5
br label %9
9: ; preds = %8, %1
%10 = phi i32 [ %3, %8 ], [ 0, %1 ]
ret i32 %10
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int stat(char *, struct stat *);
int exist(char *path) {
  int r;
  struct stat s;
  r = stat(path, &s);
  return r != -1;
}


x86 assembly (clang, -O0):
<exist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exist>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @exist(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.stat
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @stat(i8* %5, %struct.stat* %4)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, -1
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @exist(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = icmp ne i32 %4, -1
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ clientMain(int, char **);
int /*<<< orphan*/ serverMain(int, char **);
int main(int argc, char **argv) {
  if (argc <= 1) {
    serverMain(argc, argv);
  } else {
    clientMain(argc, argv);
  }
  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)
cmpl   $0x1,-0x8(%rbp)
jg     1151 <main+0x31>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <serverMain@plt>
jmp    115d <main+0x3d>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <clientMain@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     112d <main+0xd>
call   1030 <serverMain@plt>
jmp    1132 <main+0x12>
call   1040 <clientMain@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 = load i32, i32* %4
%7 = icmp sle i32 %6, 1
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* %4
%10 = load i8**, i8*** %5
%11 = call i32 @serverMain(i32 %9, i8** %10)
br label %16
12: ; preds = %2
%13 = load i32, i32* %4
%14 = load i8**, i8*** %5
%15 = call i32 @clientMain(i32 %13, i8** %14)
br label %16
16: ; preds = %12, %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @serverMain(i32 %0, i8** %1)
br label %8
6: ; preds = %2
%7 = tail call i32 @clientMain(i32 %0, i8** %1)
br label %8
8: ; preds = %6, %4
ret i32 0
}
/* Variables and functions */
int strlen(char *);
void StripCR(char *string) {
  int i;
  for (i = strlen(string) - 1; i > 0; i--)
    if (string[i] == '\n') {
      string[i] = '\0';
      break;
    }
}


x86 assembly (clang, -O0):
<StripCR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    116e <StripCR+0x5e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    115b <StripCR+0x4b>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
jmp    116e <StripCR+0x5e>
jmp    1160 <StripCR+0x50>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    112b <StripCR+0x1b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StripCR>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %eax,%ecx
add    $0xffffffff,%eax
add    %rbx,%rax
add    $0x1,%rax
cs nopw 0x0(%rax,%rax,1)
nop
cmp    $0x2,%ecx
jl     1147 <StripCR+0x37>
add    $0xffffffffffffffff,%rax
cmpb   $0xa,-0x1(%rbx,%rcx,1)
lea    -0x1(%rcx),%rcx
jne    1130 <StripCR+0x20>
movb   $0x0,(%rax)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @StripCR(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = zext i32 %2 to i64
br label %4
4: ; preds = %9, %1
%5 = phi i64 [ %6, %9 ], [ %3, %1 ]
%6 = add nsw i64 %5, -1
%7 = trunc i64 %5 to i32
%8 = icmp sgt i32 %7, 1
br i1 %8, label %9, label %16
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %0, i64 %6
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 10
br i1 %12, label %13, label %4
13: ; preds = %9
%14 = and i64 %6, 4294967295
%15 = getelementptr inbounds i8, i8* %0, i64 %14
store i8 0, i8* %15
br label %16
16: ; preds = %4, %13
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clear_promisc();
void cleanup(void) { clear_promisc(); }


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

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

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

LLVM IR (-O2):
define void @cleanup() {
%1 = tail call i32 (...) @clear_promisc()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_free(int *);
int *my_malloc(int);
int *af4() {
  int *p = my_malloc(12);
  my_free(p);
  return p;
}


x86 assembly (clang, -O0):
<af4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xc,%edi
call   1030 <my_malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <my_free@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<af4>:
push   %rbx
mov    $0xc,%edi
call   1030 <my_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <my_free@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @af4() {
%1 = alloca i32*
%2 = call i32* @my_malloc(i32 12)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @my_free(i32* %3)
%5 = load i32*, i32** %1
ret i32* %5
}

LLVM IR (-O2):
define i32* @af4() {
%1 = tail call i32* @my_malloc(i32 12)
%2 = tail call i32 @my_free(i32* %1)
ret i32* %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0xa3() {
  Assert_real((isxdigit(163) == 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_isxdigit.c",
              820, ("isxdigit should be 0 for 0xa3"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xa3\00"
define void @t_isxdigit_0xa3() {
%1 = call i64 @isxdigit(i32 163)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 820, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0xa3\00"
define void @t_isxdigit_0xa3() {
%1 = tail call i64 @isxdigit(i32 163)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 820, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  long tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
long get_system_time_in_microseconds(void) {
  struct timeval tempo;
  gettimeofday(&tempo, NULL);
  return tempo.tv_sec * 1000000 + tempo.tv_usec;
}


x86 assembly (clang, -O0):
<get_system_time_in_microseconds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x10(%rbp),%eax
cltq
add    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_system_time_in_microseconds>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movslq 0x8(%rsp),%rax
imul   $0xf4240,%rax,%rax
add    0x10(%rsp),%rax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define i64 @get_system_time_in_microseconds() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000000
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%8 = load i64, i64* %7
%9 = add nsw i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define i64 @get_system_time_in_microseconds() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%9 = load i64, i64* %8
%10 = add nsw i64 %9, %7
ret i64 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ __m64;

/* Variables and functions */
int /*<<< orphan*/ _mm_maskmove_si64(int /*<<< orphan*/, int /*<<< orphan*/,
                                     char *);
void test23(__m64 d, __m64 n, char *p) { _mm_maskmove_si64(d, n, p); }


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

x86 assembly (clang, -O2):
<test23>:
jmp    1030 <_mm_maskmove_si64@plt>

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

LLVM IR (-O2):
define void @test23(i32 %0, i32 %1, i8* %2) {
%4 = tail call i32 @_mm_maskmove_si64(i32 %0, i32 %1, i8* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ longjmp(int /*<<< orphan*/, int);
__attribute__((__noreturn__)) void sub5(jmp_buf buf) { longjmp(buf, 1); }


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

x86 assembly (clang, -O2):
<sub5>:
push   %rax
mov    $0x1,%esi
call   1030 <longjmp@plt>

LLVM IR (-O0):
define void @sub5(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @longjmp(i32 %3, i32 1)
unreachable
}

LLVM IR (-O2):
define void @sub5(i32 %0) {
%2 = tail call i32 @longjmp(i32 %0, i32 1)
unreachable
}
extern void __outl_p(unsigned int value, unsigned short port) {
  __asm__ __volatile__("out"
                       "l"
                       " %"
                       "0,%"
                       "w"
                       "1"
                       :
                       : "a"(value), "d"(port));
  __asm__ __volatile__("outb %al,$0x80");
}


x86 assembly (clang, -O0):
<__outl_p>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %edi,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x6(%rbp),%dx
out    %eax,(%dx)
out    %al,$0x80
pop    %rbp
ret

x86 assembly (clang, -O2):
<__outl_p>:
mov    %esi,%edx
mov    %edi,%eax
out    %eax,(%dx)
out    %al,$0x80
ret

LLVM IR (-O0):
define void @__outl_p(i32 %0, i16 zeroext %1) {
%3 = alloca i32
%4 = alloca i16
store i32 %0, i32* %3
store i16 %1, i16* %4
%5 = load i32, i32* %3
%6 = load i16, i16* %4
ret void
}

LLVM IR (-O2):
define void @__outl_p(i32 %0, i16 zeroext %1) {
tail call void asm sideeffect "outl $0,${1:w}", "{ax},{dx},~{dirflag},~{fpsr},~{flags}"(i32 %0, i16 %1)
tail call void asm sideeffect "outb %al,$$0x80", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
signed long long
signedlonglong_ignoring_unsignedlonglong(signed long long x,
                                         unsigned long long y) {
  return x;
}


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

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

LLVM IR (-O0):
define i64 @signedlonglong_ignoring_unsignedlonglong(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @signedlonglong_ignoring_unsignedlonglong(i64 returned %0, i64 %1) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void xlosFree(void *ptr) { free(ptr); }


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

LLVM IR (-O0):
define void @xlosFree(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 @xlosFree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void sig_alarm(int sig) {
  fprintf(stderr, "Initialization timed out.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<sig_alarm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"Initialization timed out.\0A\00"
define void @sig_alarm(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Initialization timed out.\0A\00"
define void @sig_alarm(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t op_le(uint32_t a, uint32_t b) { return a <= b; }


x86 assembly (clang, -O0):
<op_le>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_le>:
xor    %eax,%eax
cmp    %esi,%edi
setle  %al
ret

LLVM IR (-O0):
define i32 @op_le(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = icmp sle i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @op_le(i32 %0, i32 %1) {
%3 = icmp sle i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct http_request {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ http_response(struct http_request *, int,
                                 int /*<<< orphan*/ *, int /*<<< orphan*/);
int http_generic_404(struct http_request *req) {
  ;
  http_response(req, 404, NULL, 0);
  return (1);
}


x86 assembly (clang, -O0):
<http_generic_404>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x194,%esi
xor    %eax,%eax
mov    %eax,%edx
xor    %ecx,%ecx
call   1030 <http_response@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<http_generic_404>:
push   %rax
mov    $0x194,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <http_response@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.http_request = type { i32 }
define i32 @http_generic_404(%struct.http_request* %0) {
%2 = alloca %struct.http_request*
store %struct.http_request* %0, %struct.http_request** %2
%3 = load %struct.http_request*, %struct.http_request** %2
%4 = call i32 @http_response(%struct.http_request* %3, i32 404, i32* null, i32 0)
ret i32 1
}

LLVM IR (-O2):
%struct.http_request = type { i32 }
define i32 @http_generic_404(%struct.http_request* %0) {
%2 = tail call i32 @http_response(%struct.http_request* %0, i32 404, i32* null, i32 0)
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ ts_LOGf(char *, char *, char *);
char *ts_hex_dump(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
void ts_print_bytes(char *prefix, uint8_t *d, int size) {
  char *buf = ts_hex_dump(d, size, 0);
  ts_LOGf("%s -> %s\n", prefix, buf);
  free(buf);
}


x86 assembly (clang, -O0):
<ts_print_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
xor    %edx,%edx
call   1040 <ts_hex_dump@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xe9c(%rip),%rdi
call   1050 <ts_LOGf@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts_print_bytes>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rsi,%rdi
mov    %edx,%esi
xor    %edx,%edx
call   1040 <ts_hex_dump@plt>
mov    %rax,%rbx
lea    0xeb3(%rip),%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1050 <ts_LOGf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"%s -> %s\0A\00"
define void @ts_print_bytes(i8* %0, i32* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%8 = load i32*, i32** %5
%9 = load i32, i32* %6
%10 = call i8* @ts_hex_dump(i32* %8, i32 %9, i32 0)
store i8* %10, i8** %7
%11 = load i8*, i8** %4
%12 = load i8*, i8** %7
%13 = call i32 @ts_LOGf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %11, i8* %12)
%14 = load i8*, i8** %7
%15 = call i32 @free(i8* %14)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%s -> %s\0A\00"
define void @ts_print_bytes(i8* %0, i32* %1, i32 %2) {
%4 = tail call i8* @ts_hex_dump(i32* %1, i32 %2, i32 0)
%5 = tail call i32 @ts_LOGf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %4)
%6 = tail call i32 @free(i8* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLvoid;
typedef int /*<<< orphan*/ GLsizei;
typedef int /*<<< orphan*/ GLint;
typedef int /*<<< orphan*/ GLenum;

/* Variables and functions */
int /*<<< orphan*/ glTexSubImage2D(int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/ *);
void TexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset,
                   GLsizei width, GLsizei height, GLenum format, GLenum type,
                   GLvoid *pixels) {
  glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type,
                  pixels);
}


x86 assembly (clang, -O0):
<TexSubImage2D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%r11d
mov    0x18(%rbp),%r10d
mov    0x20(%rbp),%rax
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <glTexSubImage2D@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TexSubImage2D>:
jmp    1030 <glTexSubImage2D@plt>

LLVM IR (-O0):
define void @TexSubImage2D(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32* %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32*
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32* %8, i32** %18
%19 = load i32, i32* %10
%20 = load i32, i32* %11
%21 = load i32, i32* %12
%22 = load i32, i32* %13
%23 = load i32, i32* %14
%24 = load i32, i32* %15
%25 = load i32, i32* %16
%26 = load i32, i32* %17
%27 = load i32*, i32** %18
%28 = call i32 @glTexSubImage2D(i32 %19, i32 %20, i32 %21, i32 %22, i32 %23, i32 %24, i32 %25, i32 %26, i32* %27)
ret void
}

LLVM IR (-O2):
define void @TexSubImage2D(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32* %8) {
%10 = tail call i32 @glTexSubImage2D(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32* %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *, char *);
void usage(char **argv) {
  printf("%s file str\n%s str string\n", argv[0], argv[0]);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    (%rdi),%rdx
lea    0xed5(%rip),%rdi
mov    %rdx,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"%s file str\0A%s str string\0A\00"
define void @usage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = load i8**, i8*** %2
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %8)
%10 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"%s file str\0A%s str string\0A\00"
define void @usage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/, char const *,
                            int /*<<< orphan*/);
void fprint_message_to_stderr(const char *format, va_list arg_ptr) {
  printf("<<<ERR>>> ");
  (void)vfprintf(stdout, format, arg_ptr);
}


x86 assembly (clang, -O0):
<fprint_message_to_stderr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <vfprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_message_to_stderr>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <vfprintf@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"<<<ERR>>> \00"
@stdout = global i32 0
define void @fprint_message_to_stderr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdout
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = call i32 @vfprintf(i32 %6, i8* %7, i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"<<<ERR>>> \00"
@stdout = global i32 0
define void @fprint_message_to_stderr(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stdout
%5 = tail call i32 @vfprintf(i32 %4, i8* %0, i32 %1)
ret void
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ list_add(struct list *, struct list *);
int /*<<< orphan*/ list_del(struct list *);
void list_move(struct list *head, struct list *elem) {
  list_del(elem);
  list_add(head, elem);
}


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

x86 assembly (clang, -O2):
<list_move>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <list_del@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <list_add@plt>

LLVM IR (-O0):
%struct.list = type { i32 }
define void @list_move(%struct.list* %0, %struct.list* %1) {
%3 = alloca %struct.list*
%4 = alloca %struct.list*
store %struct.list* %0, %struct.list** %3
store %struct.list* %1, %struct.list** %4
%5 = load %struct.list*, %struct.list** %4
%6 = call i32 @list_del(%struct.list* %5)
%7 = load %struct.list*, %struct.list** %3
%8 = load %struct.list*, %struct.list** %4
%9 = call i32 @list_add(%struct.list* %7, %struct.list* %8)
ret void
}

LLVM IR (-O2):
%struct.list = type { i32 }
define void @list_move(%struct.list* %0, %struct.list* %1) {
%3 = tail call i32 @list_del(%struct.list* %1)
%4 = tail call i32 @list_add(%struct.list* %0, %struct.list* %1)
ret void
}
timelocal(tmp) { return mktime(tmp); }


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

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

LLVM IR (-O0):
define i32 @timelocal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, ...) bitcast (i32 (...)* @mktime to i32 (i32, ...)*)(i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @timelocal(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @mktime to i32 (i32, ...)*)(i32 %0)
ret i32 %2
}
/* Type definitions */
struct gtexGeneBed {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gtexGeneClass(struct gtexGeneBed *);
scalar_t__ strcmp(char *, int /*<<< orphan*/);
int gtexGeneIsCoding(struct gtexGeneBed *geneBed) {
  return (strcmp("coding", gtexGeneClass(geneBed)) == 0);
}


x86 assembly (clang, -O0):
<gtexGeneIsCoding>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <gtexGeneClass@plt>
mov    %eax,%esi
lea    0xec2(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtexGeneIsCoding>:
push   %rax
call   1030 <gtexGeneClass@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
call   1040 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.gtexGeneBed = type { i32 }
@.str = [7 x i8] c"coding\00"
define i32 @gtexGeneIsCoding(%struct.gtexGeneBed* %0) {
%2 = alloca %struct.gtexGeneBed*
store %struct.gtexGeneBed* %0, %struct.gtexGeneBed** %2
%3 = load %struct.gtexGeneBed*, %struct.gtexGeneBed** %2
%4 = call i32 @gtexGeneClass(%struct.gtexGeneBed* %3)
%5 = call i64 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.gtexGeneBed = type { i32 }
@.str = [7 x i8] c"coding\00"
define i32 @gtexGeneIsCoding(%struct.gtexGeneBed* %0) {
%2 = tail call i32 @gtexGeneClass(%struct.gtexGeneBed* %0)
%3 = tail call i64 @strcmp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int ioprio_prio_class(int value) { return value >> 13; }


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

x86 assembly (clang, -O2):
<ioprio_prio_class>:
mov    %edi,%eax
sar    $0xd,%eax
ret

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

LLVM IR (-O2):
define i32 @ioprio_prio_class(i32 %0) {
%2 = ashr i32 %0, 13
ret i32 %2
}
/* Type definitions */
struct uftrace_report_node {
  int dummy;
};
struct rb_root {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ find_or_create_node(struct rb_root *, char const *,
                                       struct uftrace_report_node *);
void report_add_node(struct rb_root *root, const char *name,
                     struct uftrace_report_node *node) {
  find_or_create_node(root, name, node);
}


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

x86 assembly (clang, -O2):
<report_add_node>:
jmp    1030 <find_or_create_node@plt>

LLVM IR (-O0):
%struct.rb_root = type { i32 }
%struct.uftrace_report_node = type { i32 }
define void @report_add_node(%struct.rb_root* %0, i8* %1, %struct.uftrace_report_node* %2) {
%4 = alloca %struct.rb_root*
%5 = alloca i8*
%6 = alloca %struct.uftrace_report_node*
store %struct.rb_root* %0, %struct.rb_root** %4
store i8* %1, i8** %5
store %struct.uftrace_report_node* %2, %struct.uftrace_report_node** %6
%7 = load %struct.rb_root*, %struct.rb_root** %4
%8 = load i8*, i8** %5
%9 = load %struct.uftrace_report_node*, %struct.uftrace_report_node** %6
%10 = call i32 @find_or_create_node(%struct.rb_root* %7, i8* %8, %struct.uftrace_report_node* %9)
ret void
}

LLVM IR (-O2):
%struct.rb_root = type { i32 }
%struct.uftrace_report_node = type { i32 }
define void @report_add_node(%struct.rb_root* %0, i8* %1, %struct.uftrace_report_node* %2) {
%4 = tail call i32 @find_or_create_node(%struct.rb_root* %0, i8* %1, %struct.uftrace_report_node* %2)
ret void
}
void gtk_tree_view_set_cursor_on_cell() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ be32enc(int /*<<< orphan*/ *, int /*<<< orphan*/);
void be64enc(void *pp, uint64_t u) {
  uint8_t *p = (uint8_t *)pp;
  be32enc(p, (uint32_t)(u >> 32));
  be32enc(p + 4, (uint32_t)(u & 0xffffffffU));
}


x86 assembly (clang, -O0):
<be64enc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    $0x20,%ecx
sar    %cl,%esi
call   1030 <be32enc@plt>
mov    -0x18(%rbp),%rdi
add    $0x10,%rdi
mov    -0xc(%rbp),%esi
and    $0xffffffff,%esi
call   1030 <be32enc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<be64enc>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <be32enc@plt>
add    $0x10,%rbx
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <be32enc@plt>

LLVM IR (-O0):
define void @be64enc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i32, i32* %4
%10 = ashr i32 %9, 32
%11 = call i32 @be32enc(i32* %8, i32 %10)
%12 = load i32*, i32** %5
%13 = getelementptr inbounds i32, i32* %12, i64 4
%14 = load i32, i32* %4
%15 = and i32 %14, -1
%16 = call i32 @be32enc(i32* %13, i32 %15)
ret void
}

LLVM IR (-O2):
define void @be64enc(i8* %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = tail call i32 @be32enc(i32* %3, i32 poison)
%5 = getelementptr inbounds i8, i8* %0, i64 16
%6 = bitcast i8* %5 to i32*
%7 = tail call i32 @be32enc(i32* %6, i32 %1)
ret void
}
void tdd_ifconstswapper(void) {
  int a10;
  if (a10 = 10) {
  }
  if (a10 == 100U) {
  }
  if (100U == a10) {
  }
}


x86 assembly (clang, -O0):
<tdd_ifconstswapper>:
push   %rbp
mov    %rsp,%rbp
movl   $0xa,-0x4(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    111a <tdd_ifconstswapper+0x1a>
jmp    111f <tdd_ifconstswapper+0x1f>
jmp    111f <tdd_ifconstswapper+0x1f>
cmpl   $0x64,-0x4(%rbp)
jne    112e <tdd_ifconstswapper+0x2e>
jmp    112e <tdd_ifconstswapper+0x2e>
mov    $0x64,%eax
cmp    -0x4(%rbp),%eax
jne    1141 <tdd_ifconstswapper+0x41>
jmp    1141 <tdd_ifconstswapper+0x41>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @tdd_ifconstswapper() {
%1 = alloca i32
store i32 10, i32* %1
br i1 true, label %2, label %3
2: ; preds = %0
br label %3
3: ; preds = %2, %0
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 100
br i1 %5, label %6, label %7
6: ; preds = %3
br label %7
7: ; preds = %6, %3
%8 = load i32, i32* %1
%9 = icmp eq i32 100, %8
br i1 %9, label %10, label %11
10: ; preds = %7
br label %11
11: ; preds = %10, %7
ret void
}

LLVM IR (-O2):
define void @tdd_ifconstswapper() {
ret void
}
void setnetent(stayopen) int stayopen;
{
  _setnethtent(stayopen);
  _setnetdnsent(stayopen);
}


x86 assembly (clang, -O0):
<setnetent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <_setnethtent@plt>
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <_setnetdnsent@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setnetent>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <_setnethtent@plt>
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1040 <_setnetdnsent@plt>

LLVM IR (-O0):
define void @setnetent(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, ...) bitcast (i32 (...)* @_setnethtent to i32 (i32, ...)*)(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 (i32, ...) bitcast (i32 (...)* @_setnetdnsent to i32 (i32, ...)*)(i32 %5)
ret void
}

LLVM IR (-O2):
define void @setnetent(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @_setnethtent to i32 (i32, ...)*)(i32 %0)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @_setnetdnsent to i32 (i32, ...)*)(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void AnsiTerm_clr_line(void) { printf("\x1B[2K"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"\1B[2K\00"
define void @AnsiTerm_clr_line() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"\1B[2K\00"
define void @AnsiTerm_clr_line() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int atoi(scalar_t__);
scalar_t__ getenv(char *);
int screen_columns(void) {
  if (getenv("COLUMNS"))
    return atoi(getenv("COLUMNS"));
  return 80;
}


x86 assembly (clang, -O0):
<screen_columns>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <getenv@plt>
cmp    $0x0,%rax
je     115a <screen_columns+0x3a>
lea    0xebb(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,%rdi
call   1040 <atoi@plt>
mov    %eax,-0x4(%rbp)
jmp    1161 <screen_columns+0x41>
movl   $0x50,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<screen_columns>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
je     113b <screen_columns+0x1b>
mov    %rax,%rdi
pop    %rax
jmp    1040 <atoi@plt>
mov    $0x50,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"COLUMNS\00"
define i32 @screen_columns() {
%1 = alloca i32
%2 = call i64 @getenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = call i64 @getenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @atoi(i64 %5)
store i32 %6, i32* %1
br label %8
7: ; preds = %0
store i32 80, i32* %1
br label %8
8: ; preds = %7, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [8 x i8] c"COLUMNS\00"
define i32 @screen_columns() {
%1 = tail call i64 @getenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @atoi(i64 %1)
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ %4, %3 ], [ 80, %0 ]
ret i32 %6
}
void crc16(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               55, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<crc16>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x37,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc16>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x37,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.crc16 = [6 x i8] c"crc16\00"
define void @crc16() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 55, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.crc16, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.crc16 = [6 x i8] c"crc16\00"
define void @crc16() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 55, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.crc16, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned long __builtin_wasm_current_memory();
long unsigned int f1(void) { return __builtin_wasm_current_memory(); }


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

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

LLVM IR (-O0):
define i64 @f1() {
%1 = call i64 (...) @__builtin_wasm_current_memory()
ret i64 %1
}

LLVM IR (-O2):
define i64 @f1() {
%1 = tail call i64 (...) @__builtin_wasm_current_memory()
ret i64 %1
}