xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void labelWhileStart(int number) {
  printf("\tjmp .L%dE\n", number);
  printf(".L%dS:\n", number);
}


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

x86 assembly (clang, -O2):
<labelWhileStart>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"\09jmp .L%dE\0A\00"
@.str.1 = [8 x i8] c".L%dS:\0A\00"
define void @labelWhileStart(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"\09jmp .L%dE\0A\00"
@.str.1 = [8 x i8] c".L%dS:\0A\00"
define void @labelWhileStart(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
void trace(char *s) {}


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

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

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

LLVM IR (-O2):
define void @trace(i8* nocapture %0) {
ret void
}
/* Type definitions */
struct timeval {
  int dummy;
};
typedef int /*<<< orphan*/ fd_set;

/* Variables and functions */
int /*<<< orphan*/ FD_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ FD_ZERO(int /*<<< orphan*/ *);
int select(int, int /*<<< orphan*/ *, int /*<<< orphan*/ *,
           int /*<<< orphan*/ *, struct timeval *);
int wait_for_input(int fd, struct timeval *timo) {
  fd_set ready;
  int n;
  FD_ZERO(&ready);
  FD_SET(fd, &ready);
  n = select(fd + 1, &ready, NULL, &ready, timo);
  return n;
}


x86 assembly (clang, -O0):
<wait_for_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <FD_ZERO@plt>
mov    -0x4(%rbp),%edi
lea    -0x14(%rbp),%rsi
call   1050 <FD_SET@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
mov    -0x10(%rbp),%r8
lea    -0x14(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%edx
mov    %rcx,%rsi
call   1040 <select@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_for_input>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %edi,%ebp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <FD_ZERO@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <FD_SET@plt>
add    $0x1,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %edx,%edx
mov    %rbx,%rcx
mov    %r14,%r8
call   1040 <select@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @wait_for_input(i32 %0, %struct.timeval* %1) {
%3 = alloca i32
%4 = alloca %struct.timeval*
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store %struct.timeval* %1, %struct.timeval** %4
%7 = call i32 @FD_ZERO(i32* %5)
%8 = load i32, i32* %3
%9 = call i32 @FD_SET(i32 %8, i32* %5)
%10 = load i32, i32* %3
%11 = add nsw i32 %10, 1
%12 = load %struct.timeval*, %struct.timeval** %4
%13 = call i32 @select(i32 %11, i32* %5, i32* null, i32* %5, %struct.timeval* %12)
store i32 %13, i32* %6
%14 = load i32, i32* %6
ret i32 %14
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @wait_for_input(i32 %0, %struct.timeval* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 @FD_ZERO(i32* %3)
%6 = call i32 @FD_SET(i32 %0, i32* %3)
%7 = add nsw i32 %0, 1
%8 = call i32 @select(i32 %7, i32* %3, i32* null, i32* %3, %struct.timeval* %1)
ret i32 %8
}
unsigned LZ4F_getVersion(void) { return 100; }


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

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

LLVM IR (-O0):
define i32 @LZ4F_getVersion() {
ret i32 100
}

LLVM IR (-O2):
define i32 @LZ4F_getVersion() {
ret i32 100
}
/* Variables and functions */
int /*<<< orphan*/ ENAMETOOLONG;
int /*<<< orphan*/ errno;
char *strcpy(char *, char const *);
size_t strlen(char const *);
char *pathcpy(char *dst, const char *src, size_t len) {
  if (strlen(src) >= len) {
    errno = ENAMETOOLONG;
    return NULL;
  }
  return strcpy(dst, src);
}


x86 assembly (clang, -O0):
<pathcpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <strlen@plt>
cmp    -0x20(%rbp),%rax
jb     1166 <pathcpy+0x46>
mov    0x2e8a(%rip),%rax
mov    (%rax),%ecx
mov    0x2e89(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
jmp    1177 <pathcpy+0x57>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathcpy>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
cmp    %r15,%rax
jae    1148 <pathcpy+0x28>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
jmp    115d <pathcpy+0x3d>
mov    0x2e89(%rip),%rax
mov    (%rax),%eax
mov    0x2e88(%rip),%rcx
mov    %eax,(%rcx)
xor    %r14d,%r14d
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@ENAMETOOLONG = global i32 0
@errno = global i32 0
define i8* @pathcpy(i8* %0, i8* nocapture %1, i64 %2) {
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = icmp ult i64 %4, %2
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = load i32, i32* @ENAMETOOLONG
store i32 %7, i32* @errno
br label %10
8: ; preds = %3
%9 = tail call i8* @strcpy(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
br label %10
10: ; preds = %8, %6
%11 = phi i8* [ null, %6 ], [ %0, %8 ]
ret i8* %11
}
void Calculate(int x, int y, int *prod, int *quot) {
  *prod = ++x;
  *quot = --y;
}


x86 assembly (clang, -O0):
<Calculate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x8(%rbp)
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Calculate>:
add    $0x1,%edi
mov    %edi,(%rdx)
add    $0xffffffff,%esi
mov    %esi,(%rcx)
ret

LLVM IR (-O0):
define void @Calculate(i32 %0, i32 %1, i32* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32, i32* %5
%10 = add nsw i32 %9, 1
store i32 %10, i32* %5
%11 = load i32*, i32** %7
store i32 %10, i32* %11
%12 = load i32, i32* %6
%13 = add nsw i32 %12, -1
store i32 %13, i32* %6
%14 = load i32*, i32** %8
store i32 %13, i32* %14
ret void
}

LLVM IR (-O2):
define void @Calculate(i32 %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = add nsw i32 %0, 1
store i32 %5, i32* %2
%6 = add nsw i32 %1, -1
store i32 %6, i32* %3
ret void
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
long long LLONG_MAX;
int /*<<< orphan*/ nsectospec(long long, struct timespec *);
void usectospec(long long usecs, struct timespec *ts) {
  if (usecs > 0 && LLONG_MAX / 1000LL > usecs)
    usecs *= 1000LL;
  nsectospec(usecs, ts);
}


x86 assembly (clang, -O0):
<usectospec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jle    1155 <usectospec+0x45>
mov    0x2eb6(%rip),%rax
mov    (%rax),%rax
mov    $0x3e8,%ecx
cqto
idiv   %rcx
cmp    -0x8(%rbp),%rax
jle    1155 <usectospec+0x45>
imul   $0x3e8,-0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <nsectospec@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usectospec>:
test   %rdi,%rdi
jle    1145 <usectospec+0x35>
mov    0x2ecc(%rip),%rcx
movabs $0x20c49ba5e353f7cf,%rax
9b c4 20
imulq  (%rcx)
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x7,%rdx
add    %rax,%rdx
imul   $0x3e8,%rdi,%rax
cmp    %rdi,%rdx
cmovg  %rax,%rdi
jmp    1030 <nsectospec@plt>

LLVM IR (-O0):
%struct.timespec = type { i32 }
@LLONG_MAX = global i64 0
define void @usectospec(i64 %0, %struct.timespec* %1) {
%3 = alloca i64
%4 = alloca %struct.timespec*
store i64 %0, i64* %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load i64, i64* %3
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %2
%8 = load i64, i64* @LLONG_MAX
%9 = sdiv i64 %8, 1000
%10 = load i64, i64* %3
%11 = icmp sgt i64 %9, %10
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = load i64, i64* %3
%14 = mul nsw i64 %13, 1000
store i64 %14, i64* %3
br label %15
15: ; preds = %12, %7, %2
%16 = load i64, i64* %3
%17 = load %struct.timespec*, %struct.timespec** %4
%18 = call i32 @nsectospec(i64 %16, %struct.timespec* %17)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@LLONG_MAX = global i64 0
define void @usectospec(i64 %0, %struct.timespec* %1) {
%3 = icmp sgt i64 %0, 0
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = load i64, i64* @LLONG_MAX
%6 = sdiv i64 %5, 1000
%7 = icmp sgt i64 %6, %0
%8 = mul nsw i64 %0, 1000
%9 = select i1 %7, i64 %8, i64 %0
br label %10
10: ; preds = %4, %2
%11 = phi i64 [ %0, %2 ], [ %9, %4 ]
%12 = tail call i32 @nsectospec(i64 %11, %struct.timespec* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xc0() {
  Assert_real((isspace(192) == 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_isspace.c",
              965, ("isspace should be 0 for 0xc0"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xc0>:
push   %rax
mov    $0xc0,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x3c5,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xc0\00"
define void @t_isspace_0xc0() {
%1 = tail call i64 @isspace(i32 192)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 965, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
bool hw_sel_button_pressed(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @hw_sel_button_pressed() {
ret i32 0
}
/* Variables and functions */
int strlen(char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
void strncpy_no_truncate(char *y) {
  char x[4];
  if (strlen(y) == 3)
    strncpy(x, y, 3);
}


x86 assembly (clang, -O0):
<strncpy_no_truncate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x3,%eax
jne    1150 <strncpy_no_truncate+0x30>
lea    -0xc(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncpy_no_truncate>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1040 <strlen@plt>
cmp    $0x3,%eax
jne    1144 <strncpy_no_truncate+0x24>
lea    0xc(%rsp),%rdi
mov    %rbx,%rsi
mov    $0x3,%edx
call   1030 <strncpy@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @strncpy_no_truncate(i8* %0) {
%2 = alloca i8*
%3 = alloca [4 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = icmp eq i32 %5, 3
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%9 = load i8*, i8** %2
%10 = call i32 @strncpy(i8* %8, i8* %9, i32 3)
br label %11
11: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @strncpy_no_truncate(i8* %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = tail call i32 @strlen(i8* %0)
%5 = icmp eq i32 %4, 3
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @strncpy(i8* %3, i8* %0, i32 3)
br label %8
8: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_str(char *);
void print_omp_version(void) {
  print_str("OpenMP not available on this system\r\n");
}


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"OpenMP not available on this system\0D\0A\00"
define void @print_omp_version() {
%1 = call i32 @print_str(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"OpenMP not available on this system\0D\0A\00"
define void @print_omp_version() {
%1 = tail call i32 @print_str(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
ret void
}
int count(int number) {
  if (number <= 2) {
    return (number + 1) % 2;
  }
  int last = count(number - 1);
  int secondLast = count(number - 2);
  return (number - 1) * (last + secondLast);
}


x86 assembly (clang, -O0):
<count>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2,-0x8(%rbp)
jg     113b <count+0x2b>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
jmp    1169 <count+0x59>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <count@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <count@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    -0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
imul   %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
cmp    $0x2,%edi
jg     1131 <count+0x21>
mov    %ebx,%eax
add    $0x1,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
add    %ebx,%ecx
add    $0x1,%ecx
and    $0xfffffffe,%ecx
sub    %ecx,%eax
jmp    114e <count+0x3e>
lea    -0x1(%rbx),%ebp
mov    %ebp,%edi
call   1030 <count@plt>
mov    %eax,%r14d
add    $0xfffffffe,%ebx
mov    %ebx,%edi
call   1030 <count@plt>
add    %r14d,%eax
imul   %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @count(i32 %0) {
%2 = icmp slt i32 %0, 3
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = add nsw i32 %0, 1
%5 = srem i32 %4, 2
br label %6
6: ; preds = %3, %8
%7 = phi i32 [ %14, %8 ], [ %5, %3 ]
ret i32 %7
8: ; preds = %1
%9 = add nsw i32 %0, -1
%10 = tail call i32 @count(i32 %9)
%11 = add nsw i32 %0, -2
%12 = tail call i32 @count(i32 %11)
%13 = add nsw i32 %12, %10
%14 = mul nsw i32 %13, %9
br label %6
}
/* Type definitions */
typedef scalar_t__ int16_t;

/* Variables and functions */
int16_t add_all_int16(int16_t a, int16_t b, int16_t c, int16_t d, int16_t e,
                      int16_t f, int16_t g, int16_t h, int16_t i, int16_t j) {
  return a + b + c + d + e + f + g + h + i + j;
}


x86 assembly (clang, -O0):
<add_all_int16>:
push   %rbp
mov    %rsp,%rbp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
add    -0x20(%rbp),%rax
add    -0x28(%rbp),%rax
add    -0x30(%rbp),%rax
add    0x10(%rbp),%rax
add    0x18(%rbp),%rax
add    0x20(%rbp),%rax
add    0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_all_int16>:
lea    (%rdi,%rsi,1),%rax
add    %rdx,%rax
add    %rcx,%rax
add    %r8,%rax
add    %r9,%rax
add    0x8(%rsp),%rax
add    0x10(%rsp),%rax
add    0x18(%rsp),%rax
add    0x20(%rsp),%rax
ret

LLVM IR (-O0):
define i64 @add_all_int16(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9) {
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
store i64 %0, i64* %11
store i64 %1, i64* %12
store i64 %2, i64* %13
store i64 %3, i64* %14
store i64 %4, i64* %15
store i64 %5, i64* %16
store i64 %6, i64* %17
store i64 %7, i64* %18
store i64 %8, i64* %19
store i64 %9, i64* %20
%21 = load i64, i64* %11
%22 = load i64, i64* %12
%23 = add nsw i64 %21, %22
%24 = load i64, i64* %13
%25 = add nsw i64 %23, %24
%26 = load i64, i64* %14
%27 = add nsw i64 %25, %26
%28 = load i64, i64* %15
%29 = add nsw i64 %27, %28
%30 = load i64, i64* %16
%31 = add nsw i64 %29, %30
%32 = load i64, i64* %17
%33 = add nsw i64 %31, %32
%34 = load i64, i64* %18
%35 = add nsw i64 %33, %34
%36 = load i64, i64* %19
%37 = add nsw i64 %35, %36
%38 = load i64, i64* %20
%39 = add nsw i64 %37, %38
ret i64 %39
}

LLVM IR (-O2):
define i64 @add_all_int16(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5, i64 %6, i64 %7, i64 %8, i64 %9) {
%11 = add nsw i64 %1, %0
%12 = add nsw i64 %11, %2
%13 = add nsw i64 %12, %3
%14 = add nsw i64 %13, %4
%15 = add nsw i64 %14, %5
%16 = add nsw i64 %15, %6
%17 = add nsw i64 %16, %7
%18 = add nsw i64 %17, %8
%19 = add nsw i64 %18, %9
ret i64 %19
}
/* Variables and functions */
int _getopt(int, char **, char const *);
int getopt(int argc, char *argv[], const char *opts) {
  return _getopt(argc, argv, opts);
}


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

x86 assembly (clang, -O2):
<getopt>:
jmp    1030 <_getopt@plt>

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

LLVM IR (-O2):
define i32 @getopt(i32 %0, i8** %1, i8* %2) {
%4 = tail call i32 @_getopt(i32 %0, i8** %1, i8* %2)
ret i32 %4
}
unsigned xrop3_99_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~T;
  stk2 = D | stk3;
  stk1 = S ^ stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_99_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_99_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
shl    $0x8,%esi
or     %esi,%eax
not    %eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_99_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %5
%26 = load i32, i32* %10
%27 = or i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %6
%29 = load i32, i32* %9
%30 = xor i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = and i32 %35, %36
%38 = or i32 %34, %37
ret i32 %38
}

LLVM IR (-O2):
define i32 @xrop3_99_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i32 %8, %3
ret i32 %9
}
/* Type definitions */
struct ndz_file {
  int dummy;
};
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int ENOTSUP;
int ndz_readahead(struct ndz_file *ndz, void *buf, size_t bytes, off_t offset) {
  return ENOTSUP;
}


x86 assembly (clang, -O0):
<ndz_readahead>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    0x2ece(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ndz_readahead>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
%struct.ndz_file = type { i32 }
@ENOTSUP = global i32 0
define i32 @ndz_readahead(%struct.ndz_file* %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca %struct.ndz_file*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store %struct.ndz_file* %0, %struct.ndz_file** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load i32, i32* @ENOTSUP
ret i32 %9
}

LLVM IR (-O2):
%struct.ndz_file = type { i32 }
@ENOTSUP = global i32 0
define i32 @ndz_readahead(%struct.ndz_file* nocapture readnone %0, i8* nocapture readnone %1, i64 %2, i32 %3) {
%5 = load i32, i32* @ENOTSUP
ret i32 %5
}
/* Type definitions */
struct timespec {
  int dummy;
};
typedef int /*<<< orphan*/ clockid_t;

/* Variables and functions */
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
double timedelta_ns(struct timespec *, struct timespec *);
double interval(clockid_t clk, struct timespec *start) {
  struct timespec end;
  double delta;
  clock_gettime(clk, &end);
  delta = timedelta_ns(&end, start);
  *start = end;
  return delta;
}


x86 assembly (clang, -O0):
<interval>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdi
call   1040 <timedelta_ns@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
mov    %ecx,(%rax)
movsd  -0x20(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interval>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rsp,%r14
mov    %r14,%rsi
call   1030 <clock_gettime@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <timedelta_ns@plt>
mov    (%rsp),%eax
mov    %eax,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
define double @interval(i32 %0, %struct.timespec* %1) {
%3 = alloca i32
%4 = alloca %struct.timespec*
%5 = alloca %struct.timespec
%6 = alloca double
store i32 %0, i32* %3
store %struct.timespec* %1, %struct.timespec** %4
%7 = load i32, i32* %3
%8 = call i32 @clock_gettime(i32 %7, %struct.timespec* %5)
%9 = load %struct.timespec*, %struct.timespec** %4
%10 = call double @timedelta_ns(%struct.timespec* %5, %struct.timespec* %9)
store double %10, double* %6
%11 = load %struct.timespec*, %struct.timespec** %4
%12 = bitcast %struct.timespec* %11 to i8*
%13 = bitcast %struct.timespec* %5 to i8*
%14 = load double, double* %6
ret double %14
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
define double @interval(i32 %0, %struct.timespec* %1) {
%3 = alloca %struct.timespec
%4 = bitcast %struct.timespec* %3 to i8*
%5 = call i32 @clock_gettime(i32 %0, %struct.timespec* %3)
%6 = call double @timedelta_ns(%struct.timespec* %3, %struct.timespec* %1)
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i64 0, i32 0
%8 = getelementptr %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%9 = load i32, i32* %7
store i32 %9, i32* %8
ret double %6
}
/* Variables and functions */
int DBL_EPSILON;
int /*<<< orphan*/ print_name_and_version();
int /*<<< orphan*/ printf(char *, int, int);
void print_welcome_message() {
  print_name_and_version();
  printf("Floating-point precision is 16 and epsilon is %.16lf (%e).\n\n",
         DBL_EPSILON * 10, DBL_EPSILON * 10);
}


x86 assembly (clang, -O0):
<print_welcome_message>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <print_name_and_version@plt>
mov    0x2eb6(%rip),%rax
imul   $0xa,(%rax),%esi
mov    0x2eac(%rip),%rax
imul   $0xa,(%rax),%edx
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_welcome_message>:
push   %rax
xor    %eax,%eax
call   1040 <print_name_and_version@plt>
mov    0x2eb9(%rip),%rax
mov    (%rax),%eax
add    %eax,%eax
lea    (%rax,%rax,4),%edx
lea    0xec3(%rip),%rdi
mov    %edx,%esi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [61 x i8] c"Floating-point precision is 16 and epsilon is %.16lf (%e).\0A\0A\00"
@DBL_EPSILON = global i32 0
define void @print_welcome_message() {
%1 = call i32 (...) @print_name_and_version()
%2 = load i32, i32* @DBL_EPSILON
%3 = mul nsw i32 %2, 10
%4 = load i32, i32* @DBL_EPSILON
%5 = mul nsw i32 %4, 10
%6 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [61 x i8] c"Floating-point precision is 16 and epsilon is %.16lf (%e).\0A\0A\00"
@DBL_EPSILON = global i32 0
define void @print_welcome_message() {
%1 = tail call i32 (...) @print_name_and_version()
%2 = load i32, i32* @DBL_EPSILON
%3 = mul nsw i32 %2, 10
%4 = tail call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ updateOverflow(int, unsigned int *);
void tube_BASICTrans_HELP(unsigned int *reg) { updateOverflow(1, reg); }


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

x86 assembly (clang, -O2):
<tube_BASICTrans_HELP>:
mov    %rdi,%rsi
mov    $0x1,%edi
jmp    1030 <updateOverflow@plt>

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

LLVM IR (-O2):
define void @tube_BASICTrans_HELP(i32* %0) {
%2 = tail call i32 @updateOverflow(i32 1, i32* %0)
ret void
}
int test_imm_09int16_mem(short *val) {
  return ((*val) & (-0x09 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_09int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xfffffff7,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_09int16_mem>:
movzwl (%rdi),%eax
test   $0xfff7,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_09int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -9
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_09int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -9
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ go();
void handle(int sig) {
  go();
  exit(0);
}


x86 assembly (clang, -O0):
<handle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <go@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
define void @handle(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @go()
%4 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @handle(i32 %0) {
%2 = tail call i32 (...) @go()
%3 = tail call i32 @exit(i32 0)
unreachable
}
void gprs_module_disable(void) { ; }


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

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

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

LLVM IR (-O2):
define void @gprs_module_disable() {
ret void
}
void Hal_hook_rd_sgndrecfield_receleme(void) {}


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

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

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

LLVM IR (-O2):
define void @Hal_hook_rd_sgndrecfield_receleme() {
ret void
}
/* Variables and functions */
int compress_uint(unsigned int, unsigned char *);
int compress_int(int i, unsigned char p[]) {
  unsigned val, negative = 0;
  if (i < 0) {
    negative = 1;
    val = -i;
  } else
    val = i;
  val = val << 1;
  val = val | negative;
  return (compress_uint(val, p));
}


x86 assembly (clang, -O0):
<compress_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1144 <compress_int+0x34>
movl   $0x1,-0x18(%rbp)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    114a <compress_int+0x3a>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <compress_uint@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compress_int>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
shrd   $0x1f,%eax,%edi
jmp    1030 <compress_uint@plt>

LLVM IR (-O0):
define i32 @compress_int(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
store i32 0, i32* %6
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
store i32 1, i32* %6
%10 = load i32, i32* %3
%11 = sub nsw i32 0, %10
store i32 %11, i32* %5
br label %14
12: ; preds = %2
%13 = load i32, i32* %3
store i32 %13, i32* %5
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %5
%16 = shl i32 %15, 1
store i32 %16, i32* %5
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = or i32 %17, %18
store i32 %19, i32* %5
%20 = load i32, i32* %5
%21 = load i8*, i8** %4
%22 = call i32 @compress_uint(i32 %20, i8* %21)
ret i32 %22
}

LLVM IR (-O2):
define i32 @compress_int(i32 %0, i8* %1) {
%3 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%4 = tail call i32 @llvm.fshl.i32(i32 %3, i32 %0, i32 1)
%5 = tail call i32 @compress_uint(i32 %4, i8* %1)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ dscal_(int *, double *, double *, int *);
void DSCAL(int size, double coeff, double *data, int inc) {
  if (1. != coeff)
    dscal_(&size, &coeff, data, &inc);
}


x86 assembly (clang, -O0):
<DSCAL>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movsd  0xed1(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    1145 <DSCAL+0x35>
jp     1145 <DSCAL+0x35>
jmp    115a <DSCAL+0x4a>
mov    -0x18(%rbp),%rdx
lea    -0x4(%rbp),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x1c(%rbp),%rcx
call   1030 <dscal_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DSCAL>:
sub    $0x18,%rsp
mov    %edi,0xc(%rsp)
movsd  %xmm0,0x10(%rsp)
mov    %edx,0x8(%rsp)
ucomisd 0xed6(%rip),%xmm0
jne    112e <DSCAL+0x1e>
jnp    1148 <DSCAL+0x38>
mov    %rsi,%rax
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rcx
mov    %rax,%rdx
call   1030 <dscal_@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @DSCAL(i32 %0, double %1, double* %2, i32 %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca double*
%8 = alloca i32
store i32 %0, i32* %5
store double %1, double* %6
store double* %2, double** %7
store i32 %3, i32* %8
%9 = load double, double* %6
%10 = fcmp une double 1.000000e+00, %9
br i1 %10, label %11, label %14
11: ; preds = %4
%12 = load double*, double** %7
%13 = call i32 @dscal_(i32* %5, double* %6, double* %12, i32* %8)
br label %14
14: ; preds = %11, %4
ret void
}

LLVM IR (-O2):
define void @DSCAL(i32 %0, double %1, double* %2, i32 %3) {
%5 = alloca i32
%6 = alloca double
%7 = alloca i32
store i32 %0, i32* %5
store double %1, double* %6
store i32 %3, i32* %7
%8 = fcmp une double %1, 1.000000e+00
br i1 %8, label %9, label %11
9: ; preds = %4
%10 = call i32 @dscal_(i32* %5, double* %6, double* %2, i32* %7)
br label %11
11: ; preds = %9, %4
ret void
}
int near_zero(double a) { return (a < (1e-4) && a > -(1e-4)); }


x86 assembly (clang, -O0):
<near_zero>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xor    %eax,%eax
movsd  0xeed(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
mov    %al,-0x9(%rbp)
jbe    1138 <near_zero+0x38>
movsd  -0x8(%rbp),%xmm0
movsd  0xeda(%rip),%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<near_zero>:
movsd  0xef8(%rip),%xmm1
ucomisd %xmm0,%xmm1
seta   %al
ucomisd 0xef1(%rip),%xmm0
seta   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @near_zero(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 1.000000e-04
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = fcmp ogt double %6, -1.000000e-04
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @near_zero(double %0) {
%2 = fcmp olt double %0, 1.000000e-04
%3 = fcmp ogt double %0, -1.000000e-04
%4 = and i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
void GenerateAndPlayJGWav() {}


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

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

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

LLVM IR (-O2):
define void @GenerateAndPlayJGWav() {
ret void
}
/* Type definitions */
struct tag_async_net {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ log_msg(int, char *, int, char *);
void default_sock_hup_handler(struct tag_async_net *asnet, int fd, void *info) {
  log_msg(1,
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/w1ndy/simple-http-server/refs/heads/"
          "master/asnet.h",
          66, "remote closed connection unexpectedly.");
}


x86 assembly (clang, -O0):
<default_sock_hup_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x1,%edi
lea    0xed1(%rip),%rsi
mov    $0x42,%edx
lea    0xf52(%rip),%rcx
call   1030 <log_msg@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_sock_hup_handler>:
lea    0xee9(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    $0x1,%edi
mov    $0x42,%edx
jmp    1030 <log_msg@plt>

LLVM IR (-O0):
%struct.tag_async_net = type { i32 }
@.str = [141 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/w1ndy/simple-http-server/refs/heads/master/asnet.h\00"
@.str.1 = [39 x i8] c"remote closed connection unexpectedly.\00"
define void @default_sock_hup_handler(%struct.tag_async_net* %0, i32 %1, i8* %2) {
%4 = alloca %struct.tag_async_net*
%5 = alloca i32
%6 = alloca i8*
store %struct.tag_async_net* %0, %struct.tag_async_net** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = call i32 @log_msg(i32 1, i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str, i64 0, i64 0), i32 66, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.tag_async_net = type { i32 }
@.str = [141 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/w1ndy/simple-http-server/refs/heads/master/asnet.h\00"
@.str.1 = [39 x i8] c"remote closed connection unexpectedly.\00"
define void @default_sock_hup_handler(%struct.tag_async_net* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @log_msg(i32 1, i8* getelementptr inbounds ([141 x i8], [141 x i8]* @.str, i64 0, i64 0), i32 66, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void setgmode(f, n) int f, n;
{
  adjustmode(1, 1);
  return;
  f = f;
  n = n;
}


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

x86 assembly (clang, -O2):
<setgmode>:
mov    $0x1,%edi
mov    $0x1,%esi
xor    %eax,%eax
jmp    1030 <adjustmode@plt>

LLVM IR (-O0):
define void @setgmode(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (i32, i32, ...) bitcast (i32 (...)* @adjustmode to i32 (i32, i32, ...)*)(i32 1, i32 1)
ret void
}

LLVM IR (-O2):
define void @setgmode(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @adjustmode to i32 (i32, i32, ...)*)(i32 1, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("I am a subproject executable file.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"I am a subproject executable file.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [35 x i8] c"I am a subproject executable file.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int length(register char *line) {
  register int i = 1;
  while (*line++ != '\n')
    i++;
  return i;
}


x86 assembly (clang, -O0):
<length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0xa,%eax
je     1138 <length+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <length+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<length>:
mov    $0x1,%eax
cmpb   $0xa,(%rdi)
je     111a <length+0x1a>
mov    $0x1,%eax
nop
cmpb   $0xa,(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <length+0x10>
ret

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

LLVM IR (-O2):
define i32 @length(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 10
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 1, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 10
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 1, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Type definitions */
struct crypto_skcipher {
  int dummy;
};
struct chcr_context {
  int dummy;
};

/* Variables and functions */
struct chcr_context *crypto_skcipher_ctx(struct crypto_skcipher *);
struct chcr_context *c_ctx(struct crypto_skcipher *tfm) {
  return crypto_skcipher_ctx(tfm);
}


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

x86 assembly (clang, -O2):
<c_ctx>:
jmp    1030 <crypto_skcipher_ctx@plt>

LLVM IR (-O0):
%struct.chcr_context = type { i32 }
%struct.crypto_skcipher = type { i32 }
define %struct.chcr_context* @c_ctx(%struct.crypto_skcipher* %0) {
%2 = alloca %struct.crypto_skcipher*
store %struct.crypto_skcipher* %0, %struct.crypto_skcipher** %2
%3 = load %struct.crypto_skcipher*, %struct.crypto_skcipher** %2
%4 = call %struct.chcr_context* @crypto_skcipher_ctx(%struct.crypto_skcipher* %3)
ret %struct.chcr_context* %4
}

LLVM IR (-O2):
%struct.chcr_context = type { i32 }
%struct.crypto_skcipher = type { i32 }
define %struct.chcr_context* @c_ctx(%struct.crypto_skcipher* %0) {
%2 = tail call %struct.chcr_context* @crypto_skcipher_ctx(%struct.crypto_skcipher* %0)
ret %struct.chcr_context* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ strlen(char const *);
int /*<<< orphan*/ xfwrite(char const *, scalar_t__, int /*<<< orphan*/ *);
void write_string(const char *string, FILE *to) {
  xfwrite(string, strlen(string) + 1, to);
}


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

x86 assembly (clang, -O2):
<write_string>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x1(%rax),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <xfwrite@plt>

LLVM IR (-O0):
define void @write_string(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = add nsw i64 %7, 1
%9 = load i32*, i32** %4
%10 = call i32 @xfwrite(i8* %5, i64 %8, i32* %9)
ret void
}

LLVM IR (-O2):
define void @write_string(i8* %0, i32* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = add nsw i64 %3, 1
%5 = tail call i32 @xfwrite(i8* %0, i64 %4, i32* %1)
ret void
}
/* Variables and functions */
int ccnl_ndntlv_varlenint(unsigned char **, int *, int *);
int ccnl_lrpc_varlenint(unsigned char **buf, int *len, int *val) {
  return ccnl_ndntlv_varlenint(buf, len, val);
}


x86 assembly (clang, -O0):
<ccnl_lrpc_varlenint>:
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 <ccnl_ndntlv_varlenint@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ccnl_lrpc_varlenint>:
jmp    1030 <ccnl_ndntlv_varlenint@plt>

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

LLVM IR (-O2):
define i32 @ccnl_lrpc_varlenint(i8** %0, i32* %1, i32* %2) {
%4 = tail call i32 @ccnl_ndntlv_varlenint(i8** %0, i32* %1, i32* %2)
ret i32 %4
}
void foo608() {}


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

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

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

LLVM IR (-O2):
define void @foo608() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ i2cslave_EnableACK(int);
void i2c1slave_EnableACK(void) { i2cslave_EnableACK(1); }


x86 assembly (clang, -O0):
<i2c1slave_EnableACK>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <i2cslave_EnableACK@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @i2c1slave_EnableACK() {
%1 = call i32 @i2cslave_EnableACK(i32 1)
ret void
}

LLVM IR (-O2):
define void @i2c1slave_EnableACK() {
%1 = tail call i32 @i2cslave_EnableACK(i32 1)
ret void
}