xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ soar_ecPrintMemoryPoolStatistics();
void print_memory_pool_statistics(void) { soar_ecPrintMemoryPoolStatistics(); }


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

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

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

LLVM IR (-O2):
define void @print_memory_pool_statistics() {
%1 = tail call i32 (...) @soar_ecPrintMemoryPoolStatistics()
ret void
}
double sum1(double a) { return a * 2; }


x86 assembly (clang, -O0):
<sum1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sum1>:
addsd  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @sum1(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 2.000000e+00
ret double %4
}

LLVM IR (-O2):
define double @sum1(double %0) {
%2 = fmul double %0, 2.000000e+00
ret double %2
}
char itoc(int source) {
  if ((source >= 0) && (source <= 9)) {
    return ('0' + source);
  } else {
    return ('A' + (source - 10));
  }
}


x86 assembly (clang, -O0):
<itoc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1129 <itoc+0x29>
cmpl   $0x9,-0x8(%rbp)
jg     1129 <itoc+0x29>
mov    -0x8(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1135 <itoc+0x35>
mov    -0x8(%rbp),%eax
sub    $0xa,%eax
add    $0x41,%eax
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<itoc>:
cmp    $0xa,%edi
mov    $0x30,%ecx
mov    $0x37,%eax
cmovb  %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @itoc(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 9
br i1 %8, label %9, label %13
9: ; preds = %6
%10 = load i32, i32* %3
%11 = add nsw i32 48, %10
%12 = trunc i32 %11 to i8
store i8 %12, i8* %2
br label %18
13: ; preds = %6, %1
%14 = load i32, i32* %3
%15 = sub nsw i32 %14, 10
%16 = add nsw i32 65, %15
%17 = trunc i32 %16 to i8
store i8 %17, i8* %2
br label %18
18: ; preds = %13, %9
%19 = load i8, i8* %2
ret i8 %19
}

LLVM IR (-O2):
define signext i8 @itoc(i32 %0) {
%2 = icmp ult i32 %0, 10
%3 = trunc i32 %0 to i8
%4 = select i1 %2, i8 48, i8 55
%5 = add i8 %4, %3
ret i8 %5
}
const char *rcsid(const char *p) {
  return rcsid(
      p = "@(#)$File: magic.c,v 1.73 2011/05/10 17:08:14 christos Exp $");
}


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

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

LLVM IR (-O0):
@.str = [61 x i8] c"@(#)$File: magic.c,v 1.73 2011/05/10 17:08:14 christos Exp $\00"
define i8* @rcsid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
store i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = call i8* @rcsid(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str, i64 0, i64 0))
ret i8* %3
}

LLVM IR (-O2):
define noalias i8* @rcsid(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
long _LSEEK(int fd, long offset, int whence) { return 0; }


x86 assembly (clang, -O0):
<_LSEEK>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @_LSEEK(i32 %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
ret i64 0
}

LLVM IR (-O2):
define i64 @_LSEEK(i32 %0, i64 %1, i32 %2) {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void test_C_module_binding() { printf("Hello tests!\n"); }


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

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

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

LLVM IR (-O2):
@str = [13 x i8] c"Hello tests!\00"
define void @test_C_module_binding() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int format;
};
typedef TYPE_1__ XClientMessageEvent;

/* Variables and functions */
void set_XClientMessageEvent_format(void *_p, int _v) {
  ((XClientMessageEvent *)_p)->format = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XClientMessageEvent_format>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XClientMessageEvent_format(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XClientMessageEvent_format(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
scalar_t__ strdup(char *);
char *xstrdup(char *s) {
  char *cp = (char *)strdup(s);
  if (cp == NULL) {
    fprintf(stderr, "xstrdup: out of virtual memory\n");
    exit(2);
  }
  return (cp);
}


x86 assembly (clang, -O0):
<xstrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1173 <xstrdup+0x43>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
lea    0xe9c(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrdup>:
push   %rax
call   1050 <strdup@plt>
test   %rax,%rax
je     113d <xstrdup+0xd>
pop    %rcx
ret
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
lea    0xeb3(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"xstrdup: out of virtual memory\0A\00"
define i8* @xstrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strdup(i8* %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %3
%7 = load i8*, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 2)
unreachable
13: ; preds = %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"xstrdup: out of virtual memory\0A\00"
define i8* @xstrdup(i8* %0) {
%2 = tail call i64 @strdup(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 2)
unreachable
8: ; preds = %1
%9 = inttoptr i64 %2 to i8*
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_usage_info(const char *progname) {
  printf("Usage:\n");
  printf("    %s <input-file> <output-file> <variable-name>\n", progname);
}


x86 assembly (clang, -O0):
<print_usage_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage_info>:
push   %rbx
mov    %rdi,%rbx
lea    0xf08(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [51 x i8] c" %s <input-file> <output-file> <variable-name>\0A\00"
define void @print_usage_info(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str.1 = [51 x i8] c" %s <input-file> <output-file> <variable-name>\0A\00"
@str = [7 x i8] c"Usage:\00"
define void @print_usage_info(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int FDSelect(int, int, struct timeval *);
int FDCheckForBytes(int fd) {
  struct timeval tv;
  tv.tv_sec = 0;
  tv.tv_usec = 0;
  if (FDSelect(fd, 1, &tv) & 1)
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<FDCheckForBytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
lea    -0x18(%rbp),%rdx
call   1030 <FDSelect@plt>
and    $0x1,%eax
cmp    $0x0,%eax
je     1154 <FDCheckForBytes+0x44>
movl   $0x1,-0x4(%rbp)
jmp    115b <FDCheckForBytes+0x4b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FDCheckForBytes>:
sub    $0x18,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
mov    $0x1,%esi
call   1030 <FDSelect@plt>
and    $0x1,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define i32 @FDCheckForBytes(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.timeval
store i32 %0, i32* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 1
store i64 0, i64* %5
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i32 0, i32 0
store i64 0, i64* %6
%7 = load i32, i32* %3
%8 = call i32 @FDSelect(i32 %7, i32 1, %struct.timeval* %4)
%9 = and i32 %8, 1
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 1, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define i32 @FDCheckForBytes(i32 %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = bitcast %struct.timeval* %2 to i8*
%5 = call i32 @FDSelect(i32 %0, i32 1, %struct.timeval* %2)
%6 = and i32 %5, 1
ret i32 %6
}
/* Variables and functions */
int atol(char *);
scalar_t__ malloc(long);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, long);
int /*<<< orphan*/ sleep(int);
int main(int argc, char *argv[]) {
  long size = atol(argv[1]) * 1024 * 1024;
  char *memory = (char *)malloc(size);
  memset(memory, 0, size);
  sleep(999999999);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atol@plt>
shl    $0xa,%eax
shl    $0xa,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    $0x3b9ac9ff,%edi
call   1060 <sleep@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rdi
call   1050 <atol@plt>
shl    $0x14,%eax
movslq %eax,%rbx
mov    %rbx,%rdi
call   1040 <malloc@plt>
mov    %rax,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    $0x3b9ac9ff,%edi
call   1060 <sleep@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
%10 = load i8*, i8** %9
%11 = call i32 @atol(i8* %10)
%12 = mul nsw i32 %11, 1024
%13 = mul nsw i32 %12, 1024
%14 = sext i32 %13 to i64
store i64 %14, i64* %6
%15 = load i64, i64* %6
%16 = call i64 @malloc(i64 %15)
%17 = inttoptr i64 %16 to i8*
store i8* %17, i8** %7
%18 = load i8*, i8** %7
%19 = load i64, i64* %6
%20 = call i32 @memset(i8* %18, i32 0, i64 %19)
%21 = call i32 @sleep(i32 999999999)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @atol(i8* %4)
%6 = shl nsw i32 %5, 20
%7 = sext i32 %6 to i64
%8 = tail call i64 @malloc(i64 %7)
%9 = inttoptr i64 %8 to i8*
%10 = tail call i32 @memset(i8* %9, i32 0, i64 %7)
%11 = tail call i32 @sleep(i32 999999999)
ret i32 0
}
int isgraph(int c) { return c > 0x20 && c < 0x7f; }


x86 assembly (clang, -O0):
<isgraph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1120 <isgraph+0x20>
cmpl   $0x7f,-0x4(%rbp)
setl   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isgraph>:
add    $0xffffffdf,%edi
xor    %eax,%eax
cmp    $0x5e,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @isgraph(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 32
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 127
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 @isgraph(i32 %0) {
%2 = add i32 %0, -33
%3 = icmp ult i32 %2, 94
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
bool ncurses_is_subwin(const WINDOW *win) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @ncurses_is_subwin(i32* nocapture readnone %0) {
ret i32 0
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ S_IFCHR;
int _fstat(int32_t file, struct stat *st) {
  st->st_mode = S_IFCHR;
  return 0;
}


x86 assembly (clang, -O0):
<_fstat>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ece(%rip),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_fstat>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
mov    %eax,(%rsi)
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
@S_IFCHR = global i32 0
define i32 @_fstat(i32 %0, %struct.stat* %1) {
%3 = alloca i32
%4 = alloca %struct.stat*
store i32 %0, i32* %3
store %struct.stat* %1, %struct.stat** %4
%5 = load i32, i32* @S_IFCHR
%6 = load %struct.stat*, %struct.stat** %4
%7 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
store i32 %5, i32* %7
ret i32 0
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@S_IFCHR = global i32 0
define i32 @_fstat(i32 %0, %struct.stat* nocapture writeonly %1) {
%3 = load i32, i32* @S_IFCHR
%4 = getelementptr inbounds %struct.stat, %struct.stat* %1, i64 0, i32 0
store i32 %3, i32* %4
ret i32 0
}
int pth_pth_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pth_pth_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ serveur();
int /*<<< orphan*/ usleep(int);
main(int argc, char *argv[]) {
  while (1) {
    usleep(100 * 1000);
    serveur();
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x186a0,%edi
call   1040 <usleep@plt>
mov    $0x0,%al
call   1030 <serveur@plt>
jmp    1136 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x186a0,%edi
call   1040 <usleep@plt>
xor    %eax,%eax
call   1030 <serveur@plt>
jmp    1130 <main+0x10>

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
br label %6
6: ; preds = %2, %6
%7 = call i32 @usleep(i32 100000)
%8 = call i32 (...) @serveur()
br label %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %2, %3
%4 = tail call i32 @usleep(i32 100000)
%5 = tail call i32 (...) @serveur()
br label %3
}
void set_bsp_node_CHtExtNodeCfgEn(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _mm_add_pi16(int /*<<< orphan*/, int /*<<< orphan*/);
__m64 __attribute__((no, unused)) test(__m64 s1, __m64 s2) {
  return _mm_add_pi16(s1, s2);
}


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

x86 assembly (clang, -O2):
<test>:
jmp    1030 <_mm_add_pi16@plt>

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

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_add_pi16(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printKey() { printf("KEY: "); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"KEY: \00"
define void @printKey() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int usage(const char *cmd) {
  printf("Usage: %s [options]\n"
         "\n"
         "Options:\n"
         "-------\n"
         "-o <file>  Write output to <file>. If not set, will dump to stdout\n"
         "-u <unit>  Desired size unit (default b); b | k[b] | m[b] | g[b]\n"
         "-s <bytes  Number of units to be written (bytes by default) (>1)\n"
         "-b <size>  Buffer size in bytes (>1)\n",
         cmd);
  return 0;
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [273 x i8] c"Usage: %s [options]\0A\0AOptions:\0A-------\0A-o <file> Write output to <file>. If not set, will dump to stdout\0A-u <unit> Desired size unit (default b); b | k[b] | m[b] | g[b]\0A-s <bytes Number of units to be written (bytes by default) (>1)\0A-b <size> Buffer size in bytes (>1)\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([273 x i8], [273 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [273 x i8] c"Usage: %s [options]\0A\0AOptions:\0A-------\0A-o <file> Write output to <file>. If not set, will dump to stdout\0A-u <unit> Desired size unit (default b); b | k[b] | m[b] | g[b]\0A-s <bytes Number of units to be written (bytes by default) (>1)\0A-b <size> Buffer size in bytes (>1)\0A\00"
define i32 @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([273 x i8], [273 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
char *strsignal(int sig) {
  static char signame[40];
  sprintf(signame, "SIG #%d", sig);
  return signame;
}


x86 assembly (clang, -O0):
<strsignal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0x2f1b(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2f08(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsignal>:
push   %rbx
mov    %edi,%edx
lea    0x2f26(%rip),%rbx
lea    0xedf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@strsignal.signame = internal global [40 x i8] zeroinitializer
@.str = [8 x i8] c"SIG #%d\00"
define i8* @strsignal(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @strsignal.signame, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* getelementptr inbounds ([40 x i8], [40 x i8]* @strsignal.signame, i64 0, i64 0)
}

LLVM IR (-O2):
@strsignal.signame = internal global [40 x i8] zeroinitializer
@.str = [8 x i8] c"SIG #%d\00"
define i8* @strsignal(i32 %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @strsignal.signame, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([40 x i8], [40 x i8]* @strsignal.signame, i64 0, i64 0)
}
unsigned long gcd_ui(unsigned long x, unsigned long y) {
  unsigned long t;
  if (y < x) {
    t = x;
    x = y;
    y = t;
  }
  while (y > 0) {
    t = y;
    y = x % y;
    x = t;
  }
  return x;
}


x86 assembly (clang, -O0):
<gcd_ui>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1132 <gcd_ui+0x32>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1137 <gcd_ui+0x37>
cmpq   $0x0,-0x10(%rbp)
jbe    1167 <gcd_ui+0x67>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1137 <gcd_ui+0x37>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd_ui>:
mov    %rsi,%rdx
cmp    %rdi,%rsi
mov    %rdi,%rax
cmovb  %rsi,%rax
cmovb  %rdi,%rdx
test   %rdx,%rdx
jne    112d <gcd_ui+0x2d>
ret
nopw   0x0(%rax,%rax,1)
xor    %edx,%edx
div    %rcx
mov    %rcx,%rax
test   %rdx,%rdx
je     1142 <gcd_ui+0x42>
mov    %rdx,%rcx
mov    %rax,%rdx
or     %rcx,%rdx
shr    $0x20,%rdx
jne    1120 <gcd_ui+0x20>
xor    %edx,%edx
div    %ecx
jmp    1125 <gcd_ui+0x25>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @gcd_ui(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = load i64, i64* %3
%8 = icmp ult i64 %6, %7
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i64, i64* %3
store i64 %10, i64* %5
%11 = load i64, i64* %4
store i64 %11, i64* %3
%12 = load i64, i64* %5
store i64 %12, i64* %4
br label %13
13: ; preds = %9, %2
br label %14
14: ; preds = %17, %13
%15 = load i64, i64* %4
%16 = icmp ugt i64 %15, 0
br i1 %16, label %17, label %23
17: ; preds = %14
%18 = load i64, i64* %4
store i64 %18, i64* %5
%19 = load i64, i64* %3
%20 = load i64, i64* %4
%21 = urem i64 %19, %20
store i64 %21, i64* %4
%22 = load i64, i64* %5
store i64 %22, i64* %3
br label %14
23: ; preds = %14
%24 = load i64, i64* %3
ret i64 %24
}

LLVM IR (-O2):
define i64 @gcd_ui(i64 %0, i64 %1) {
%3 = icmp ult i64 %1, %0
%4 = select i1 %3, i64 %1, i64 %0
%5 = select i1 %3, i64 %0, i64 %1
%6 = icmp eq i64 %5, 0
br i1 %6, label %12, label %7
7: ; preds = %2, %7
%8 = phi i64 [ %10, %7 ], [ %5, %2 ]
%9 = phi i64 [ %8, %7 ], [ %4, %2 ]
%10 = urem i64 %9, %8
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %7
12: ; preds = %7, %2
%13 = phi i64 [ %4, %2 ], [ %8, %7 ]
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, size_t);
void load(int flag, void *dst1, void *src1, size_t size1, void *dst2,
          void *src2, size_t size2) {
#pragma HLS inline off
  if (flag) {
    memcpy(dst1, src1, size1);
    memcpy(dst2, src2, size2);
  }
}


x86 assembly (clang, -O0):
<load>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     115f <load+0x4f>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <memcpy@plt>
mov    -0x28(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    0x10(%rbp),%rdx
call   1030 <memcpy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load>:
test   %edi,%edi
je     1145 <load+0x35>
push   %r15
push   %r14
push   %rbx
mov    %r9,%r14
mov    %r8,%rbx
mov    0x20(%rsp),%r15
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rcx,%rdx
call   1030 <memcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <memcpy@plt>
ret

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

LLVM IR (-O2):
define void @load(i32 %0, i8* %1, i8* %2, i64 %3, i8* %4, i8* %5, i64 %6) {
%8 = icmp eq i32 %0, 0
br i1 %8, label %12, label %9
9: ; preds = %7
%10 = tail call i32 @memcpy(i8* %1, i8* %2, i64 %3)
%11 = tail call i32 @memcpy(i8* %4, i8* %5, i64 %6)
br label %12
12: ; preds = %9, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_flag_data(int, int *);
void fgmvwrite_flag_data_(int *data_type, int flagdata[]) {
  gmvwrite_flag_data(*data_type, flagdata);
}


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

x86 assembly (clang, -O2):
<fgmvwrite_flag_data_>:
mov    (%rdi),%edi
jmp    1030 <gmvwrite_flag_data@plt>

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

LLVM IR (-O2):
define void @fgmvwrite_flag_data_(i32* nocapture %0, i32* %1) {
%3 = load i32, i32* %0
%4 = tail call i32 @gmvwrite_flag_data(i32 %3, i32* %1)
ret void
}
unsigned long hash_fnv(char *s) {
  unsigned long hash = 14695981039346656037UL;
  unsigned long c;
  while ((c = (unsigned long)*s++)) {
    hash ^= c;
    hash *= 1099511628211UL;
  }
  return hash;
}


x86 assembly (clang, -O0):
<hash_fnv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0xcbf29ce484222325,%rax
9c f2 cb
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbq (%rax),%rax
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     115b <hash_fnv+0x5b>
mov    -0x18(%rbp),%rax
xor    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
movabs $0x100000001b3,%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1116 <hash_fnv+0x16>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_fnv>:
movabs $0xcbf29ce484222325,%rsi
9c f2 cb
mov    (%rdi),%cl
test   %cl,%cl
je     113a <hash_fnv+0x3a>
add    $0x1,%rdi
movabs $0x100000001b3,%rdx
xchg   %ax,%ax
movsbq %cl,%rax
xor    %rsi,%rax
imul   %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %rax,%rsi
test   %cl,%cl
jne    1120 <hash_fnv+0x20>
ret
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @hash_fnv(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ -3750763034362895579, %1 ]
%8 = sext i8 %5 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = xor i64 %7, %8
%11 = mul i64 %10, 1099511628211
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ -3750763034362895579, %1 ], [ %11, %4 ]
ret i64 %15
}
void B(void *v) {
  printf(1, "B\n");
  thread_yield();
  texit();
}


x86 assembly (clang, -O0):
<B>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
lea    0xeb8(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <thread_yield@plt>
mov    $0x0,%al
call   1050 <texit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<B>:
push   %rax
lea    0xec8(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <thread_yield@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <texit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"B\0A\00"
define void @B(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* inttoptr (i64 1 to i8*), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = call i32 (...) @thread_yield()
%5 = call i32 (...) @texit()
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"B\0A\00"
define void @B(i8* nocapture readnone %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 1 to i8*), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @thread_yield()
%4 = tail call i32 (...) @texit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
long double __asinhl(long double x) {
  fputs("__asinhl not implemented\n", stderr);
  __set_errno(ENOSYS);
  return 0.0;
}


x86 assembly (clang, -O0):
<__asinhl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
lea    0xec2(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__asinhl>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1040 <fputs@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
fldz
pop    %rax
ret

LLVM IR (-O0):
@.str = [26 x i8] c"__asinhl not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__asinhl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fputs(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* @ENOSYS
%6 = call i32 @__set_errno(i32 %5)
ret x86_fp80 0xK00000000000000000000
}

LLVM IR (-O2):
@.str = [26 x i8] c"__asinhl not implemented\0A\00"
@stderr = global i32 0
@ENOSYS = global i32 0
define x86_fp80 @__asinhl(x86_fp80 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fputs(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret x86_fp80 0xK00000000000000000000
}
char signum_char(char i) {
  if (i > 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<signum_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x0,%eax
jle    1120 <signum_char+0x20>
movb   $0x1,-0x1(%rbp)
jmp    1124 <signum_char+0x24>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signum_char>:
test   %dil,%dil
setg   %al
ret

LLVM IR (-O0):
define signext i8 @signum_char(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i8 1, i8* %2
br label %9
8: ; preds = %1
store i8 0, i8* %2
br label %9
9: ; preds = %8, %7
%10 = load i8, i8* %2
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @signum_char(i8 signext %0) {
%2 = icmp sgt i8 %0, 0
%3 = zext i1 %2 to i8
ret i8 %3
}
void twoxbr_generic_output(void *data, unsigned *out_width,
                           unsigned *out_height, unsigned width,
                           unsigned height) {
  *out_width = width * 2;
  *out_height = height * 2;
}


x86 assembly (clang, -O0):
<twoxbr_generic_output>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<twoxbr_generic_output>:
add    %ecx,%ecx
mov    %ecx,(%rsi)
add    %r8d,%r8d
mov    %r8d,(%rdx)
ret

LLVM IR (-O0):
define void @twoxbr_generic_output(i8* %0, i32* %1, i32* %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %9
%12 = mul i32 %11, 2
%13 = load i32*, i32** %7
store i32 %12, i32* %13
%14 = load i32, i32* %10
%15 = mul i32 %14, 2
%16 = load i32*, i32** %8
store i32 %15, i32* %16
ret void
}

LLVM IR (-O2):
define void @twoxbr_generic_output(i8* nocapture readnone %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2, i32 %3, i32 %4) {
%6 = shl i32 %3, 1
store i32 %6, i32* %1
%7 = shl i32 %4, 1
store i32 %7, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *__attribute__((no, noclone)) build_int_cst(void *base, long long offset) {
  if (offset != 4)
    abort();
  return base;
}


x86 assembly (clang, -O0):
<build_int_cst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x4,-0x10(%rbp)
je     1132 <build_int_cst+0x22>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_int_cst>:
cmp    $0x4,%rsi
jne    111a <build_int_cst+0xa>
mov    %rdi,%rax
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @build_int_cst(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp ne i64 %5, 4
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %2
%10 = load i8*, i8** %3
ret i8* %10
}

LLVM IR (-O2):
define i8* @build_int_cst(i8* readnone returned %0, i64 %1) {
%3 = icmp eq i64 %1, 4
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 (...) @abort()
unreachable
6: ; preds = %2
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x96() {
  Assert_real((isupper(150) == 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_isupper.c",
              755, ("isupper should be 0 for 0x96"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x96>:
push   %rax
mov    $0x96,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2f3,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x96\00"
define void @t_isupper_0x96() {
%1 = call i64 @isupper(i32 150)
%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 755, 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x96\00"
define void @t_isupper_0x96() {
%1 = tail call i64 @isupper(i32 150)
%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 755, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glPopMatrix();
void qglPopMatrix(void) { glPopMatrix(); }


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

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

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

LLVM IR (-O2):
define void @qglPopMatrix() {
%1 = tail call i32 (...) @glPopMatrix()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ big16(int /*<<< orphan*/);
uint16_t big2host16(uint16_t n) { return big16(n); }


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

x86 assembly (clang, -O2):
<big2host16>:
jmp    1030 <big16@plt>

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

LLVM IR (-O2):
define i32 @big2host16(i32 %0) {
%2 = tail call i32 @big16(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void version(void) {
  printf("kore %d.%d-%s ", 1, 2, "current");
  printf("\n");
  exit(0);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
lea    0xed3(%rip),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<version>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xed0(%rip),%rcx
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"kore %d.%d-%s \00"
@.str.1 = [8 x i8] c"current\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @version() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [15 x i8] c"kore %d.%d-%s \00"
@.str.1 = [8 x i8] c"current\00"
define void @version() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 1, i32 2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ add_one(int *);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  int x = 4;
  add_one(&x);
  printf("%i\n", x);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x4,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <add_one@plt>
mov    0x4(%rsp),%esi
lea    0xec2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 4, i32* %6
%7 = call i32 @add_one(i32* %6)
%8 = load i32, i32* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 4, i32* %3
%5 = call i32 @add_one(i32* %3)
%6 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}
int do_504() { return 504; }


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

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

LLVM IR (-O0):
define i32 @do_504() {
ret i32 504
}

LLVM IR (-O2):
define i32 @do_504() {
ret i32 504
}
/* Variables and functions */
int rename(char const *, char const *);
__attribute__((__weak__, __always___)) int
softboundmpx_rename(const char *old_path, const char *new_path) {
  return rename(old_path, new_path);
}


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

x86 assembly (clang, -O2):
<softboundmpx_rename>:
jmp    1030 <rename@plt>

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

LLVM IR (-O2):
define weak i32 @softboundmpx_rename(i8* %0, i8* %1) {
%3 = tail call i32 @rename(i8* %0, i8* %1)
ret i32 %3
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void DESLengthSet(uint32_t ui32Base, uint32_t ui32Length) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000024))) = ui32Length;
}


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

x86 assembly (clang, -O2):
<DESLengthSet>:
mov    %rsi,0x24(%rdi)
ret

LLVM IR (-O0):
define void @DESLengthSet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 36
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @DESLengthSet(i64 %0, i64 %1) {
%3 = add i64 %0, 36
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}